mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-01-27 20:14:11 +00:00
Log: Add microseconds for all kinds of logs
https://github.com/XTLS/Xray-core/issues/4313#issuecomment-2613932895
This commit is contained in:
parent
740a6b0dcd
commit
5679d717ee
@ -146,7 +146,7 @@ func (w *fileLogWriter) Close() error {
|
|||||||
func CreateStdoutLogWriter() WriterCreator {
|
func CreateStdoutLogWriter() WriterCreator {
|
||||||
return func() Writer {
|
return func() Writer {
|
||||||
return &consoleLogWriter{
|
return &consoleLogWriter{
|
||||||
logger: log.New(os.Stdout, "", log.Ldate|log.Ltime),
|
logger: log.New(os.Stdout, "", log.Ldate|log.Ltime|log.Lmicroseconds),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -155,7 +155,7 @@ func CreateStdoutLogWriter() WriterCreator {
|
|||||||
func CreateStderrLogWriter() WriterCreator {
|
func CreateStderrLogWriter() WriterCreator {
|
||||||
return func() Writer {
|
return func() Writer {
|
||||||
return &consoleLogWriter{
|
return &consoleLogWriter{
|
||||||
logger: log.New(os.Stderr, "", log.Ldate|log.Ltime),
|
logger: log.New(os.Stderr, "", log.Ldate|log.Ltime|log.Lmicroseconds),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -174,7 +174,7 @@ func CreateFileLogWriter(path string) (WriterCreator, error) {
|
|||||||
}
|
}
|
||||||
return &fileLogWriter{
|
return &fileLogWriter{
|
||||||
file: file,
|
file: file,
|
||||||
logger: log.New(file, "", log.Ldate|log.Ltime),
|
logger: log.New(file, "", log.Ldate|log.Ltime|log.Lmicroseconds),
|
||||||
}
|
}
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user