mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-01-02 23:47:07 -05:00
trace only non nil error
This commit is contained in:
parent
6bbc3a6945
commit
2b80d096ff
@ -68,6 +68,9 @@ func getLoggerAndPrefix(s errors.Severity) (internal.LogWriter, string) {
|
||||
|
||||
// Trace logs an error message based on its severity.
|
||||
func Trace(err error) {
|
||||
if err == nil {
|
||||
return
|
||||
}
|
||||
logger, prefix := getLoggerAndPrefix(errors.GetSeverity(err))
|
||||
logger.Log(&internal.ErrorLog{
|
||||
Prefix: prefix,
|
||||
|
Loading…
Reference in New Issue
Block a user