Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ConsoleTraceLogger implements Logger and writes all log messages to stdout. ConsoleTraceLogger = Synchronize(consoleLogger{LevelTrace}) // ConsoleDebugLogger implements Logger and writes all LevelDebug and above messages to stdout. ConsoleDebugLogger = Synchronize(consoleLogger{LevelDebug}) // ConsoleInfoLogger implements Logger and writes all LevelInfo and above log messages to stdout. ConsoleInfoLogger = Synchronize(consoleLogger{LevelInfo}) // ConsoleWarnLogger implements Logger and writes all LevelWarn and above log messages to stdout. ConsoleWarnLogger = Synchronize(consoleLogger{LevelWarn}) // ConsoleErrorLogger implements Logger and writes all LevelError log messages to stdout. ConsoleErrorLogger = Synchronize(consoleLogger{LevelError}) // NilLogger drops all log messages. NilLogger = nilLogger{} )
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger interface { // Log is invoked with the log level, the log message, and key/value pairs // of any relevant log details. The keys are always strings, while the // values are unspecified. Log(level LogLevel, text string, args ...interface{}) // MinLevel returns the minimum level at which the logging is performed. // This method must be thread-safe and wait-free even if IsConcurrent returns false. MinLevel() LogLevel // IsConcurrent returns true iff the logger can be safely concurrently accessed by multiple go-routines. IsConcurrent() bool }
Logger is minimal logging interface designed to be easily adaptable to any logging library.
func Synchronize ¶
Click to show internal directories.
Click to hide internal directories.