Documentation ¶
Overview ¶
Copyright 2018-2019 The trust-net Authors a logger uitility method
Index ¶
Constants ¶
View Source
const ( DEBUG = uint(1) INFO = uint(2) ERROR = uint(3) NONE = uint(1 << 10) )
log levels
View Source
const ( EnvLogfile = "LOG_FILE" DefaultLogFile = "app.log" )
Variables ¶
This section is empty.
Functions ¶
func GetLogFile ¶
func GetLogLevel ¶
func GetLogLevel() uint
func SetLogLevel ¶
func SetLogLevel(level uint)
Types ¶
type Logger ¶
type Logger interface { // log message with DEBUG log level, only if log level is DEBUG or lower Debug(format string, args ...interface{}) // log message with INFO log level, only if log level is INFO or lower Info(format string, args ...interface{}) // log message with ERROR log level, only if log level is ERROR or lower Error(format string, args ...interface{}) }
Click to show internal directories.
Click to hide internal directories.