mirror of
https://github.com/XTLS/Xray-core.git
synced 2024-11-30 02:43:01 +00:00
23 lines
435 B
Go
23 lines
435 B
Go
package quic
|
|
|
|
type QlogWriter struct {
|
|
connID []byte
|
|
}
|
|
|
|
func (w *QlogWriter) Write(b []byte) (int, error) {
|
|
// to much log, only turn on when debug Quic
|
|
|
|
// if len(b) > 1 { // skip line separator "0a" in qlog
|
|
// log.Record(&log.GeneralMessage{
|
|
// Severity: log.Severity_Debug,
|
|
// Content: fmt.Sprintf("[%x] %s", w.connID, b),
|
|
// })
|
|
// }
|
|
return len(b), nil
|
|
}
|
|
|
|
func (w *QlogWriter) Close() error {
|
|
// Noop
|
|
return nil
|
|
}
|