mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-24 01:08:31 +02:00
refactor: clean up logger and metric initialization flow
This commit is contained in:
@@ -45,9 +45,9 @@ func fmtMessage(msg string) string {
|
||||
return strutils.JoinRune(lines, '\n')
|
||||
}
|
||||
|
||||
func InitLogger(out io.Writer) {
|
||||
func InitLogger(out ...io.Writer) {
|
||||
writer := zerolog.ConsoleWriter{
|
||||
Out: out,
|
||||
Out: zerolog.MultiLevelWriter(out...),
|
||||
TimeFormat: timeFmt,
|
||||
FormatMessage: func(msgI interface{}) string { // pad spaces for each line
|
||||
return fmtMessage(msgI.(string))
|
||||
|
||||
Reference in New Issue
Block a user