Documentation
¶
Overview ¶
Package log is used to initialize the logger, and supplies some assistant functions about log.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var LogOpts = []gconf.Opt{
gconf.StrOpt("log.file", "The file path of the log. The default is stdout.").As("logfile"),
gconf.StrOpt("log.level", "The level of the log, such as debug, info").D("info").As("loglevel"),
}
LogOpts collects the options about the log.
Functions ¶
func InitLogging ¶
func InitLogging(level, filepath string)
InitLogging is equal to InitLogging2(level, filepath, "100M", 100).
func InitLogging2 ¶
InitLogging2 initializes the logging.
If filepath is empty, it will use Stdout as the writer.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.