Documentation
¶
Overview ¶
Package log is a generic logging system that does multiplexing of logs according to the caller interface of the log functions. InitLogging() should be called to set up multiplexing for an interface and Log(intf interface{}) should be used for all subsequent loggings. A logging hook is used that gets triggered on every log function calls, and this is where multiplexing is done. The hook keeps a map from raw pointers of the interfaces passed in by InitLogging() to its output io.Writer. A call to Log(intf interface{}) sets the caller key, which is then retrieved in the hook to determine which io.Writer to use for the log entry.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitLogging ¶
InitLogging sets up logging for an input interface.
Types ¶
This section is empty.