fixes for doc

This commit is contained in:
Pavel 2019-12-26 18:00:55 +03:00
parent aca2daae8d
commit ea81193031
2 changed files with 3 additions and 1 deletions

View File

@ -159,6 +159,7 @@ func (e *Engine) UnsafeLogger() LoggerInterface {
return e.logger return e.logger
} }
// SetLogger sets provided logger instance to engine
func (e *Engine) SetLogger(l LoggerInterface) *Engine { func (e *Engine) SetLogger(l LoggerInterface) *Engine {
if l == nil { if l == nil {
return e return e

View File

@ -125,13 +125,14 @@ func (l *Logger) Warning(args ...interface{}) {
l.logger.Warning(args...) l.logger.Warning(args...)
} }
// Warningf logs a message using WARNING as log level.
func (l *Logger) Warningf(format string, args ...interface{}) { func (l *Logger) Warningf(format string, args ...interface{}) {
l.mutex.Lock() l.mutex.Lock()
defer l.mutex.Unlock() defer l.mutex.Unlock()
l.logger.Warningf(format, args...) l.logger.Warningf(format, args...)
} }
// Warningf logs a message using WARNING as log level. // Notice logs a message using NOTICE as log level.
func (l *Logger) Notice(args ...interface{}) { func (l *Logger) Notice(args ...interface{}) {
l.mutex.Lock() l.mutex.Lock()
defer l.mutex.Unlock() defer l.mutex.Unlock()