util/log/logger.go
func (l *LoggerBase) Log(lvl Level, msg string) {
	lvln, ok := levelNums[lvl]
	if !ok {
		panic("bad log level")
	}

	if lvln < levelNums[l.conf.Level] {
		return
	}

	var stack *string
	if lvln >= levelNums[l.conf.StackLevel] {
		tmp := string(debug.Stack())
		stack = &tmp
	}

	if err := l.log(lvl, msg, l.ctx, stack); err != nil {
		panic("failed to log: " + err.Error())
	}

	if lvl == Fatal {
		panic("fatal log event")
	}
}
func (l *LoggerBase) Log(lvl Level, msg string) {
	lvln, ok := levelNums[lvl]
	if !ok {
		panic("bad log level")
	}

	if lvln < levelNums[l.conf.Level] {
		return
	}

	var stack *string
	if lvln >= levelNums[l.conf.StackLevel] {
		tmp := string(debug.Stack())
		stack = &tmp
	}

	if err := l.log(lvl, msg, l.ctx, stack); err != nil {
		panic("failed to log: " + err.Error())
	}

	if lvl == Fatal {
		panic("fatal log event")
	}
}
// Log adds a new log message with a given severity level.