package qlog import ( "bufio" "context" "fmt" "log" "os" "strings" "github.com/quic-go/quic-go/internal/utils" "github.com/quic-go/quic-go/logging" ) // DefaultConnectionTracer creates a qlog file in the qlog directory specified by the QLOGDIR environment variable. // File names are _.sqlog. // Returns nil if QLOGDIR is not set. func DefaultConnectionTracer(_ context.Context, p logging.Perspective, connID logging.ConnectionID) *logging.ConnectionTracer { var label string switch p { case logging.PerspectiveClient: label = "client" case logging.PerspectiveServer: label = "server" } return qlogDirTracer(p, connID, label) } // qlogDirTracer creates a qlog file in the qlog directory specified by the QLOGDIR environment variable. // File names are _