Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // LogRotator is one of the logging outputs. It should be closed on // application shutdown. LogRotator *rotator.Rotator Log = backendLog.Logger("BTCW") )
Loggers per subsystem. A single backend logger is created and all subsytem loggers created from it will write to the backend. When adding new subsystems, add the subsystem logger variable here and to the subsystemLoggers map.
Loggers can not be used before the log rotator has been initialized with a log file. This must be performed early during application startup by calling initLogRotator.
var SubsystemLoggers = map[string]btclog.Logger{ "BTCW": Log, "WLLT": walletLog, "TMGR": txmgrLog, "CHNS": chainLog, "GRPC": grpcLog, "RPCS": legacyRPCLog, "BTCN": btcnLog, }
SubsystemLoggers maps each subsystem identifier to its associated logger.
Functions ¶
func InitLogRotator ¶
func InitLogRotator(logFile string)
InitLogRotator initializes the logging rotater to write logs to logFile and create roll files in the same directory. It must be called before the package-global log rotater variables are used.
func SetLogLevel ¶
SetLogLevel sets the logging level for provided subsystem. Invalid subsystems are ignored. Uninitialized subsystems are dynamically created as needed.
func SetLogLevels ¶
func SetLogLevels(logLevel string)
SetLogLevels sets the log level for all subsystem loggers to the passed level. It also dynamically creates the subsystem loggers as needed, so it can be used to initialize the logging system.
Types ¶
This section is empty.