镜像自地址
https://github.com/tuna/tunasync.git
已同步 2025-12-07 15:06:47 +00:00
style: better logging
这个提交包含在:
@@ -12,7 +12,11 @@ func InitLogger(verbose, debug, withSystemd bool) {
|
||||
if withSystemd {
|
||||
fmtString = "[%{level:.6s}] %{message}"
|
||||
} else {
|
||||
fmtString = "%{color}[%{time:06-01-02 15:04:05}][%{level:.6s}][%{shortfile}]%{color:reset} %{message}"
|
||||
if debug {
|
||||
fmtString = "%{color}[%{time:06-01-02 15:04:05}][%{level:.6s}][%{shortfile}]%{color:reset} %{message}"
|
||||
} else {
|
||||
fmtString = "%{color}[%{time:06-01-02 15:04:05}][%{level:.6s}]%{color:reset} %{message}"
|
||||
}
|
||||
}
|
||||
format := logging.MustStringFormatter(fmtString)
|
||||
logging.SetFormatter(format)
|
||||
|
||||
在新工单中引用
屏蔽一个用户