Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LogLevel ¶
type LogLevel int8
Level defines log levels.
const ( // No log LogLevel_Disabled LogLevel = iota // Very low frequency messages that should always be displayed (such as copyright) LogLevel_Show // Errors that cause the application to stop LogLevel_Fatal // Errors that don't stop the app LogLevel_Error // Alert conditions that not generate an error LogLevel_Warning // Important details, such as the version of the components when lifting LogLevel_Info // Important business details, such as the identification of the transaction and the user who carried it out LogLevel_Business // Details of all the Business request and response exchanged with the outside LogLevel_Message // Detailed execution's information LogLevel_Debug // Detail of executed querys with their input parameters LogLevel_Query // Maximum level of detail, such as the values returned by the querys, http trace, etc. LogLevel_Trace )
func NewLogLevel ¶
func (LogLevel) IsLogAllowed ¶
type Logger ¶
type Logger interface {
//Sets the current log level. (e.g. "debug")
SetLogLevel(level string) error
//Sets the log writer. (e.g. os.Stdout)
SetOutput(w io.Writer)
//Sets the function to write the log's timestamp. (e.g. time.Now)
SetTimestampFunc(f func() time.Time)
//Includes the ref field on the related log msg call
WithRefID(refID string) Logger
Show(msg string)
Showf(msg string, v ...interface{})
Fatal(err error, msg string)
Fatalf(err error, msg string, v ...interface{})
Error(err error, msg string)
Errorf(err error, msg string, v ...interface{})
Warn(msg string)
Warnf(msg string, v ...interface{})
Info(msg string)
Infof(msg string, v ...interface{})
Bus(msg string)
Busf(msg string, v ...interface{})
Msg(msg string)
Msgf(msg string, v ...interface{})
Dbg(msg string)
Dbgf(msg string, v ...interface{})
Qry(msg string)
Qryf(msg string, v ...interface{})
Trace(msg string)
Tracef(msg string, v ...interface{})
}
func NewNoLogLogger ¶
func NewNoLogLogger() Logger
Click to show internal directories.
Click to hide internal directories.