1
0
镜像自地址 https://github.com/tuna/tunasync.git 已同步 2025-12-07 15:06:47 +00:00

style: better logging

这个提交包含在:
bigeagle
2016-04-29 20:26:51 +08:00
父节点 6e84da0f6a
当前提交 f8fd1ae460
共有 14 个文件被更改,包括 81 次插入41 次删除

查看文件

@@ -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)