浏览代码

fix default logger

ls 3 年之前
父节点
当前提交
a1f43f8969
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      xlog/logger.go

+ 2 - 1
xlog/logger.go

@@ -22,7 +22,8 @@ func New(w io.Writer) *Logger {
 
 
 // DefaultLogger defult logger
 // DefaultLogger defult logger
 func DefaultLogger(w io.Writer) *Logger {
 func DefaultLogger(w io.Writer) *Logger {
-	return New(w)
+	defLog = New(w)
+	return defLog
 }
 }
 
 
 // Writer returns the output destination for the standard logger.
 // Writer returns the output destination for the standard logger.