# Functions
Debug logs a debug statement.
Error logs an error statement with callstack.
Fatal logs a fatal statement.
Info logs an info statement.
IsDebug determines if this logger logs a debug statement.
IsInfo determines if this logger logs an info statement.
IsTrace determines if this logger logs a trace statement.
IsWarn determines if this logger logs a warning statement.
New creates a colorable default logger.
No description provided by the author
NewConcurrentWriter crates a new concurrent writer wrapper around existing writer.
NewHappyDevFormatter returns a new instance of HappyDevFormatter.
NewJSONFormatter creates a new instance of JSONFormatter.
NewLogger creates a new default logger.
NewLogger3 creates a new logger with a writer, name and formatter.
NewTextFormatter returns a new instance of TextFormatter.
ProcessEnv (re)processes environment.
ProcessLogxiColorsEnv parases LOGXI_COLORS.
ProcessLogxiEnv parses LOGXI variable.
ProcessLogxiFormatEnv parses LOGXI_FORMAT.
RegisterFormatFactory registers a format factory function.
Suppress supresses logging and is useful to supress output in in unit tests.
Trace logs a trace statement.
Warn logs a warning statement.
# Constants
FormatEnv selects formatter based on LOGXI_FORMAT environment variable.
FormatHappy uses HappyDevFormatter.
FormatJSON uses JSONFormatter.
FormatText uses TextFormatter.
LevelAlert means action must be taken immediately.
LevelAll is all levels.
LevelCritical is alias for LevelFatal.
LevelDebug is debug level.
LevelEmergency is usually 0 but that is also the "zero" value for Go, which means whenever we do any lookup in string -> int map 0 is returned (not good).
LevelEnv chooses level from LOGXI environment variable or defaults to LevelInfo.
LevelError is a non-urgen failure to notify devlopers or admins.
LevelFatal means it should be corrected immediately, eg cannot connect to database.
LevelInfo is info level.
LevelNotice is normal but significant condition.
LevelOff means logging is disabled for logger.
LevelTrace is trace level and displays file and line in terminal.
LevelWarn indiates an error will occur if action is not taken, eg file system 85% full.
Version is the version of this package.
# Variables
The assignment character between key-value pairs.
DefaultLogLog is the default log for this package.
internalLog is the logger used by logxi itself.
KeyMap is the key map to use when printing log statements.
LevelMap maps int enums to string level.
LevelMap maps int enums to string level.
NullLog is a noop logger.
Separator is the separator to use between key value pairsvar Separator = "{~}".
# Structs
No description provided by the author
ConcurrentWriter is a concurrent safe wrapper around io.Writer.
Configuration comes from environment or external services like consul, etcd.
DefaultLogger is the default logger for this package.
HappyDevFormatter is the formatter used for terminals.
JSONFormatter is a fast, efficient JSON formatter optimized for logging.
KeyMapping is the key map used to print built-in log entry fields.
NullLogger is the default logger for this package.
TextFormatter is the default recorder used if one is unspecified when creating a new Logger.
# Type aliases
CreateFormatterFunc is a function which creates a new instance of a Formatter.