MCPcopy Create free account

hub / github.com/op/go-logging / functions

Functions136 in github.com/op/go-logging

↓ 44 callersMethodErrorf
Errorf logs a message using ERROR as log level.
logger.go:213
↓ 31 callersMethodFormatted
Formatted returns the formatted log record string.
logger.go:59
↓ 25 callersFunctionMemoryRecordN
TODO share more code between these tests
memory_test.go:13
↓ 23 callersMethodSetLevel
(Level, string)
level.go:57
↓ 20 callersFunctionSetBackend
SetBackend replaces the backend currently set with the given new logging backend.
backend.go:18
↓ 17 callersFunctionMustGetLogger
MustGetLogger is like GetLogger but panics if the logger can't be created. It simplifies safe initialization of a global logger for eg. a package.
logger.go:118
↓ 16 callersMethodlog
(lvl Level, format *string, args ...interface{})
logger.go:143
↓ 12 callersFunctionNewLogBackend
NewLogBackend creates a new LogBackend.
log_nix.go:54
↓ 12 callersFunctionNewMemoryBackend
NewMemoryBackend creates a simple in-memory logging backend.
memory.go:56
↓ 11 callersFunctionInitForTesting
TODO pick one of the memory backends and stick with it or share interface. InitForTesting is a convenient method when using logging in a test. Once ca
memory.go:20
↓ 10 callersMethodDebug
Debug logs a message using DEBUG as log level.
logger.go:248
↓ 10 callersFunctionMustStringFormatter
MustStringFormatter is equivalent to NewStringFormatter with a call to panic on error.
format.go:262
↓ 8 callersFunctionAddModuleLevel
AddModuleLevel wraps a log backend with knobs to have different log levels for different modules.
level.go:77
↓ 8 callersFunctionRunLogBenchmark
(b *testing.B)
log_test.go:133
↓ 7 callersFunctionSetFormatter
SetFormatter sets the default formatter for all new backends. A backend will fetch this value once it is needed to format a record. Note that backends
format.go:132
↓ 7 callersMethodString
String returns the string representation of a logging level.
level.go:39
↓ 6 callersFunctionColorSeq
(color color)
log_nix.go:93
↓ 6 callersFunctionColorSeqBold
(color color)
log_nix.go:97
↓ 6 callersFunctionformatFuncName
formatFuncName tries to extract certain part of the runtime formatted function name to some pre-defined variation. This function is known to not work
format.go:341
↓ 6 callersFunctiontestCallpath
(t *testing.T, format string, expect string)
log_test.go:47
↓ 5 callersFunctionChannelMemoryRecordN
(b *ChannelMemoryBackend, n int)
memory_test.go:27
↓ 5 callersMethodError
Error logs a message using ERROR as log level.
logger.go:208
↓ 5 callersMethodInfo
Info logs a message using INFO as log level.
logger.go:238
↓ 5 callersMethodLog
(Level, int, *Record)
backend.go:13
↓ 4 callersMethodFormat
(calldepth int, r *Record, w io.Writer)
format.go:105
↓ 4 callersMethodNotice
Notice logs a message using NOTICE as log level.
logger.go:228
↓ 4 callersFunctiongetLastLine
(backend *MemoryBackend)
format_test.go:35
↓ 3 callersMethodDebugf
Debugf logs a message using DEBUG as log level.
logger.go:253
↓ 3 callersMethodFlush
Flush waits until all records in the buffered channel have been processed.
memory.go:207
↓ 3 callersMethodGetLevel
(string)
level.go:56
↓ 3 callersMethodIsEnabledFor
(Level, string)
level.go:58
↓ 3 callersFunctionMultiLogger
MultiLogger creates a logger which contain multiple loggers.
multi.go:16
↓ 3 callersMethodadd
(verb fmtVerb, layout string)
format.go:270
↓ 3 callersFunctionlogAndGetLine
(backend *MemoryBackend)
format_test.go:30
↓ 2 callersMethodHead
Head returns the oldest record node kept in memory. It can be used to iterate over records, one by one, up to the last record. Note: new records can
memory.go:117
↓ 2 callersMethodInfof
Infof logs a message using INFO as log level.
logger.go:243
↓ 2 callersFunctionLogLevel
LogLevel returns the log level from a string representation.
level.go:44
↓ 2 callersFunctionNewBackendFormatter
NewBackendFormatter creates a new backend which makes all records that passes through it beeing formatted by the specific formatter.
format.go:404
↓ 2 callersFunctionNewChannelMemoryBackend
NewChannelMemoryBackend creates a simple in-memory logging backend which utilizes a go channel for communication. Start will automatically be called
memory.go:146
↓ 2 callersFunctionNewStringFormatter
NewStringFormatter returns a new Formatter which outputs the log record as a string based on the 'verbs' specified in the format string. The verbs:
format.go:199
↓ 2 callersMethodNext
Next returns the next record node. If there's no node available, it will return nil.
memory.go:43
↓ 2 callersFunctionReset
Reset restores the internal state of the logging library.
logger.go:127
↓ 2 callersFunctionRunLogBenchmarkFixedString
(b *testing.B)
log_test.go:156
↓ 2 callersMethodSetBackend
SetBackend overrides any previously defined backend for this logger.
logger.go:104
↓ 2 callersMethodWarning
Warning logs a message using WARNING as log level.
logger.go:218
↓ 2 callersMethodinsertRecord
(rec *Record)
memory.go:190
↓ 2 callersFunctionsetConsoleTextAttribute
setConsoleTextAttribute sets the attributes of characters written to the console screen buffer by the WriteFile or WriteConsole function. See http://m
log_windows.go:99
↓ 1 callersMethodCritical
Critical logs a message using CRITICAL as log level.
logger.go:198
↓ 1 callersMethodFatal
Fatal is equivalent to l.Critical(fmt.Sprint()) followed by a call to os.Exit(1).
logger.go:174
↓ 1 callersMethodFatalf
Fatalf is equivalent to l.Critical followed by a call to os.Exit(1).
logger.go:180
↓ 1 callersMethodFd
()
log_windows.go:58
↓ 1 callersMethodGetLevel
GetLevel returns the log level for the given module.
level.go:90
↓ 1 callersFunctionGetLogger
TODO call NewLogger and remove MustGetLogger? GetLogger creates and returns a Logger object based on the module name.
logger.go:112
↓ 1 callersMethodIsEnabledFor
IsEnabledFor returns true if the logger is enabled for the given level.
logger.go:139
↓ 1 callersMethodIsEnabledFor
IsEnabledFor will return true if logging is enabled for the given module.
level.go:108
↓ 1 callersMethodLog
(backend *MemoryBackend)
format_test.go:45
↓ 1 callersMethodMessage
Message returns the log record message.
logger.go:69
↓ 1 callersFunctionRedact
Redact returns a string of * having the same length as s.
logger.go:28
↓ 1 callersMethodRedacted
()
logger.go:24
↓ 1 callersMethodStart
Start launches the internal goroutine which starts processing data from the input channel.
memory.go:158
↓ 1 callersFunctiona
(log *Logger)
log_test.go:37
↓ 1 callersFunctionb
(log *Logger)
log_test.go:36
↓ 1 callersFunctionc
(log *Logger)
log_test.go:35
↓ 1 callersFunctiondoFmtVerbLevelColor
(layout string, level Level, output io.Writer)
log_nix.go:101
↓ 1 callersFunctionformatCallpath
(calldepth int, depth int)
format.go:362
↓ 1 callersFunctiongetFmtVerbByName
(name string)
format.go:94
↓ 1 callersFunctiongetFormatter
()
format.go:114
↓ 1 callersMethodgetFormatterAndCacheCurrent
()
level.go:121
↓ 1 callersMethodprocess
()
memory.go:170
↓ 1 callersFunctionrealFunc
(backend *MemoryBackend)
format_test.go:39
↓ 1 callersFunctionrec
(log *Logger, r int)
log_test.go:39
FunctionBenchmarkLogChannelMemoryBackend
(b *testing.B)
log_test.go:92
FunctionBenchmarkLogFixed
(b *testing.B)
log_test.go:143
FunctionBenchmarkLogFixedIgnored
(b *testing.B)
log_test.go:150
FunctionBenchmarkLogLeveled
(b *testing.B)
log_test.go:100
FunctionBenchmarkLogLogBackend
(b *testing.B)
log_test.go:107
FunctionBenchmarkLogLogBackendColor
(b *testing.B)
log_test.go:113
FunctionBenchmarkLogLogBackendLongFileFlag
(b *testing.B)
log_test.go:127
FunctionBenchmarkLogLogBackendStdFlags
(b *testing.B)
log_test.go:121
FunctionBenchmarkLogMemoryBackend
(b *testing.B)
log_test.go:86
FunctionBenchmarkLogMemoryBackendIgnored
(b *testing.B)
log_test.go:80
FunctionBenchmarkStringFormatter
(b *testing.B)
format_test.go:167
FunctionConvertColors
ConvertColors takes a list of ints representing colors for log levels and converts them into strings for ANSI color formatting
log_nix.go:80
MethodCriticalf
Criticalf logs a message using CRITICAL as log level.
logger.go:203
FunctionExample
()
example_test.go:5
MethodFormat
(calldepth int, r *Record, output io.Writer)
format.go:274
FunctionGetLevel
GetLevel returns the logging level for the specified module.
backend.go:37
MethodGetLevel
GetLevel returns the highest level enabled by all backends.
multi.go:40
MethodHead
Head returns the oldest record node kept in memory. It can be used to iterate over records, one by one, up to the last record. Note: new records can
memory.go:235
MethodIsEnabledFor
IsEnabledFor returns true if any of the backends are enabled for it.
multi.go:58
MethodLog
(level Level, calldepth int, rec *Record)
log_windows.go:84
MethodLog
Log implements the Backend interface.
log_nix.go:59
MethodLog
Log implements the Log function required by the Backend interface.
format.go:409
MethodLog
(level Level, calldepth int, rec *Record)
level.go:112
MethodLog
Log implements the Log method required by Backend.
memory.go:61
MethodLog
Log implements the Log method required by Backend.
memory.go:225
MethodLog
Log passes the log record to all backends.
multi.go:25
MethodLog
Log implements the Backend interface.
syslog.go:35
MethodLog
(level Level, calldepth int, rec *Record)
syslog_fallback.go:26
FunctionNewLogBackend
NewLogBackend creates a new LogBackend.
log_windows.go:72
next →1–100 of 136, ranked by callers