# Packages
No description provided by the author
# Functions
AddGlobalFields adds global fields.
Alert alerts v in alert level, and the message is written to error log.
Close closes the logging.
CollectSysLog redirects system log into logx info.
ContextWithFields returns a new context with the given fields.
Debug writes v into access log.
Debugf writes v with format into access log.
Debugv writes v into access log with json content.
Debugw writes msg along with fields into access log.
DefaultRotateRule is a default log rotating rule, currently DailyRotateRule.
Disable disables the logging.
DisableStat disables the stat logs.
Error writes v into error log.
Errorf writes v with format into error log.
ErrorStack writes v along with call stack into error log.
ErrorStackf writes v along with call stack in format into error log.
Errorv writes v into error log with json content.
Errorw writes msg along with fields into error log.
Field returns a LogField for the given key and value.
Info writes v into access log.
Infof writes v with format into access log.
Infov writes v into access log with json content.
Infow writes msg along with fields into access log.
Must checks if err is nil, otherwise logs the error and exits.
MustSetup sets up logging with given config c.
NewLessLogger returns a LessLogger.
NewLogger returns a RotateLogger with given filename and rule, etc.
NewSizeLimitRotateRule returns the rotation rule with size limit.
NewWriter creates a new Writer with the given io.Writer.
Reset clears the writer and resets the log level.
SetLevel sets the logging level.
SetUp sets up the logx.
SetWriter sets the logging writer.
Severe writes v into severe log.
Severef writes v with format into severe log.
Slow writes v into slow log.
Slowf writes v with format into slow log.
Slowv writes v into slow log with json content.
Sloww writes msg along with fields into slow log.
Stat writes v into stat log.
Statf writes v with format into stat log.
WithCallerSkip returns a Logger with given caller skip.
WithColor is a helper function to add color to a string, only in plain encoding.
WithColorPadding is a helper function to add color to a string with leading and trailing spaces, only in plain encoding.
WithContext sets ctx to log, for keeping tracing information.
WithCooldownMillis customizes logging on writing call stack interval.
WithDuration returns a Logger with given duration.
WithFields returns a new logger with the given fields.
WithGzip customizes logging to automatically gzip the log files.
WithKeepDays customizes logging to keep logs with days.
WithMaxBackups customizes how many log files backups will be kept.
WithMaxSize customizes how much space the writing log file can take up.
WithRotation customizes which log rotation rule to use.
# Constants
DebugLevel logs everything.
ErrorLevel includes errors, slows, stacks.
InfoLevel does not include debugs.
SevereLevel only log severe messages.
# Variables
ErrLogFileClosed is an error that indicates the log file is already closed.
ErrLogPathNotSet is an error that indicates the log path is not set.
ErrLogServiceNameNotSet is an error that indicates that the service name is not set.
ExitOnFatal defines whether to exit on fatal errors, defined here to make it easier to test.
# Structs
No description provided by the author
A LessLogger is a logger that control to log once during the given duration.
A LogConf is a logging config.
No description provided by the author
No description provided by the author
No description provided by the author
# Interfaces
A Logger represents a logger.
No description provided by the author
No description provided by the author
# Type aliases
No description provided by the author