From ea81193031021f2fb2188520012a2ffd5cf1da1f Mon Sep 17 00:00:00 2001 From: Pavel Date: Thu, 26 Dec 2019 18:00:55 +0300 Subject: [PATCH] fixes for doc --- core/engine.go | 1 + core/logger.go | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/core/engine.go b/core/engine.go index c71a60e..395ced6 100644 --- a/core/engine.go +++ b/core/engine.go @@ -159,6 +159,7 @@ func (e *Engine) UnsafeLogger() LoggerInterface { return e.logger } +// SetLogger sets provided logger instance to engine func (e *Engine) SetLogger(l LoggerInterface) *Engine { if l == nil { return e diff --git a/core/logger.go b/core/logger.go index b5fe7de..1c440b9 100644 --- a/core/logger.go +++ b/core/logger.go @@ -125,13 +125,14 @@ func (l *Logger) Warning(args ...interface{}) { l.logger.Warning(args...) } +// Warningf logs a message using WARNING as log level. func (l *Logger) Warningf(format string, args ...interface{}) { l.mutex.Lock() defer l.mutex.Unlock() 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{}) { l.mutex.Lock() defer l.mutex.Unlock()