Documentation ¶
Overview ¶
Package logger is a default implementation of InterfaceLogger declared in "github.com/ottemo/commerce/env" package.
Default logger is pretty simple implementation, which takes an message and puts it into a "storage" (a file with specific name in this case). If for some reason message can not be places in file (file access denied, etc.) message will be printed to stdout. Message time (in RFC3339 format) and specified prefix adds to message before output.
Index ¶
Constants ¶
View Source
const ( ConstCollectCallStack = true // flag to indicate that call stack information within error is required ConstConfigPathError = "general.error" ConstConfigPathErrorLogLevel = "general.error.log_level" ConstErrorModule = "env/logger" ConstErrorLevel = env.ConstErrorLevelService )
Package global constants
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultLogger ¶
type DefaultLogger struct{}
DefaultLogger is a default implementer of InterfaceLogger
func (*DefaultLogger) Log ¶
func (it *DefaultLogger) Log(storage string, prefix string, msg string)
Log is a general case logging function
func (*DefaultLogger) LogError ¶
func (it *DefaultLogger) LogError(err error)
LogError makes error log
Click to show internal directories.
Click to hide internal directories.