Add docs for NullLogger.

This commit is contained in:
brent s. 2022-09-06 01:01:39 -04:00
parent 94145fb4c7
commit a2a849600b
Signed by: bts
GPG Key ID: 8C004C2F93481F6B

View File

@ -3,18 +3,19 @@ Package logging implements and presents various loggers under a unified interfac

These particular loggers (logging.Logger) available are:

StdLogger
FileLogger
SystemDLogger (Linux only)
SyslogLogger (Linux only)
WinLogger (Windows only)
NullLogger
StdLogger
FileLogger
SystemDLogger (Linux only)
SyslogLogger (Linux only)
WinLogger (Windows only)

There is a sixth type of logging.Logger, MultiLogger, that allows for multiple loggers to be written to with a single call.
There is a seventh type of logging.Logger, MultiLogger, that allows for multiple loggers to be written to with a single call.
As you may have guessed, NullLogger doesn't actually log anything but is fully "functional" as a logging.Logger.

Note that for some Loggers, the prefix may be modified - "literal" loggers (StdLogger and FileLogger) will append a space to the end of the prefix.
If this is undesired (unlikely), you will need to modify (Logger).Prefix and run (Logger).Logger.SetPrefix(yourPrefixHere) for the respective logger.


Every logging.Logger type has the following methods that correspond to certain "levels".

Alert(s string, v ...interface{}) (err error)