package
0.13.6
Repository: https://github.com/cryptix-network/cryptixd.git
Documentation: pkg.go.dev

# Functions

InitLog attaches log file and error log file to the backend log.
InitLogStdout attaches stdout to the backend log and starts the logger.
LevelFromString returns a level based on the input string s.
LogAndMeasureExecutionTime logs that `functionName` has started.
LogMemoryStats logs memory stats for `functionName`.
NewBackend creates a new logger backend.
NewBackendWithFlags configures a Backend to use the specified flags rather than using the package's defaults as determined through the LOGFLAGS environment variable.
NewLogClosure casts a function to a LogClosure.
ParseAndSetLogLevels attempts to parse the specified debug level and set the levels accordingly.
RegisterSubSystem Registers a new subsystem logger, should be called in a global variable, returns the existing one if the subsystem is already registered.
SetLogLevel sets the logging level for provided subsystem.
SetLogLevels sets the log level for all subsystem loggers to the passed level.
SetLogLevelsString the same as SetLogLevels but also parses the level from a string.
SupportedSubsystems returns a sorted slice of the supported subsystems for logging purposes.

# Constants

Level constants.
Level constants.
Level constants.
Level constants.
Level constants.
Level constants.
Level constants.
LogFlagLongFile modifies the logger output to include full path and line number of the logging callsite, e.g.
LogFlagShortFile modifies the logger output to include filename and line number of the logging callsite, e.g.

# Variables

BackendLog is the logging backend used to create all subsystem loggers.

# Structs

Backend is a logging backend.
Logger is a subsystem logger for a Backend.

# Type aliases

Level is the level at which a logger is configured.
LogClosure is a closure that can be printed with %s to be used to generate expensive-to-create data for a detailed log level and avoid doing the work if the data isn't printed.