From a2a849600bbb9b6504529bd3d1c14002a21ddd37 Mon Sep 17 00:00:00 2001 From: brent s Date: Tue, 6 Sep 2022 01:01:39 -0400 Subject: [PATCH] Add docs for NullLogger. --- logging/doc.go | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/logging/doc.go b/logging/doc.go index a7d2275..bf5a526 100644 --- a/logging/doc.go +++ b/logging/doc.go @@ -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)