MCPcopy Create free account

hub / github.com/sirupsen/logrus / functions

Functions506 in github.com/sirupsen/logrus

↓ 2 callersMethodclone
clone returns a shallow copy of h. Callers must clone fields or groups before modifying them.
hooks/slog/handler.go:162
↓ 2 callersFunctioncolorize
(level Level, s string)
level.go:23
↓ 2 callersFunctiondoLoggerBenchmarkWithFormatter
(b *testing.B, f logrus.Formatter)
logger_bench_test.go:105
↓ 2 callersMethodisColored
(isTerminal bool)
text_formatter.go:127
↓ 2 callersFunctionisInvalidField
(v any)
entry.go:220
↓ 2 callersFunctionisSafeByte
isSafeByte returns true if the byte is allowed unquoted (ASCII and in the allowlist). It purposely uses byte arithmetic (no runes) for performance.
text_formatter.go:448
↓ 2 callersMethodlevel
()
logger.go:399
↓ 2 callersMethodlogArgs
(level Level, panicAfter bool, args ...any)
entry.go:301
↓ 2 callersMethodlogf
(level Level, panicAfter bool, format string, args ...any)
entry.go:305
↓ 2 callersMethodlogln
logln uses Sprintln for multiple arguments to preserve Println-style spacing between args, then trims the trailing newline.
entry.go:311
↓ 2 callersFunctionparseLevel
(b []byte)
logrus.go:44
↓ 2 callersFunctionprefixFieldClashes
This is to not silently overwrite `time`, `msg`, `func` and `level` fields when dumping it. If this code wasn't there doing: logrus.WithField("level
formatter.go:55
↓ 2 callersFunctionrunHandlers
()
alt_exit.go:42
↓ 2 callersFunctionsprint
sprint is fmt.Sprint with fast paths for zero or one string argument.
entry.go:573
↓ 2 callersMethodtoLogrusLevel
toLogrusLevel maps a slog level using LevelMapper or the default mapping.
hooks/slog/handler.go:70
↓ 1 callersFunctionAddHook
AddHook adds a hook to the standard logger hooks.
exported.go:51
↓ 1 callersMethodDebugFn
(fn LogFunction)
logger.go:289
↓ 1 callersMethodDebugf
(format string, args ...any)
logrus.go:188
↓ 1 callersMethodDebugln
(args ...any)
logrus.go:189
↓ 1 callersFunctionDeferExitHandler
DeferExitHandler prepends a Logrus Exit handler to the list of handlers, call logrus.Exit to invoke all handlers. The handlers will also be invoked wh
alt_exit.go:74
↓ 1 callersMethodDisable
()
logger.go:80
↓ 1 callersMethodDup
Dup creates a copy of the entry for further modification. Data is cloned to avoid mutating the original entry. Other fields (Logger, Time, Context, e
entry.go:112
↓ 1 callersMethodEnabled
Enabled reports whether the handler handles records at the given level. It maps the slog level to a logrus level and consults the underlying logger.
hooks/slog/handler.go:79
↓ 1 callersFunctionError
Error logs a message at level [ErrorLevel] on the standard logger.
exported.go:114
↓ 1 callersMethodErrorf
(format string, args ...any)
entry.go:502
↓ 1 callersMethodErrorln
(args ...any)
logrus.go:210
↓ 1 callersMethodFatalFn
(fn LogFunction)
logger.go:315
↓ 1 callersMethodFatalln
(args ...any)
logrus.go:157
↓ 1 callersMethodFire
Fire all the hooks for the passed level. Used by `entry.log` to fire appropriate hooks for a log entry.
hooks.go:26
↓ 1 callersMethodFire
Fire forwards the provided logrus Entry to the underlying slog.Logger's Handler, mapping it to a slog.Record. Time and caller information are preserve
hooks/slog/slog.go:102
↓ 1 callersFunctionGetLevel
GetLevel returns the standard logger level.
exported.go:41
↓ 1 callersFunctionInfo
Info logs a message at level [InfoLevel] on the standard logger.
exported.go:99
↓ 1 callersMethodInfof
(format string, args ...any)
entry.go:486
↓ 1 callersMethodInfoln
(args ...any)
entry.go:540
↓ 1 callersMethodLevels
()
hooks.go:9
↓ 1 callersMethodLevels
()
hooks/syslog/syslog.go:60
↓ 1 callersMethodMarshalText
()
logrus.go:78
↓ 1 callersMethodPanicFn
(fn LogFunction)
logger.go:320
↓ 1 callersFunctionParseLevel
ParseLevel takes a string level and returns the Logrus log level constant.
logrus.go:40
↓ 1 callersMethodPrintFn
(fn LogFunction)
logger.go:297
↓ 1 callersFunctionSetLevel
SetLevel sets the standard logger level.
exported.go:36
↓ 1 callersMethodSetNoLock
SetNoLock disables the lock for situations where a file is opened with appending mode, and safe for concurrent writes to the file (within 4k message o
logger.go:395
↓ 1 callersFunctionSetOutput
SetOutput sets the standard logger output.
exported.go:20
↓ 1 callersMethodTraceFn
(fn LogFunction)
logger.go:285
↓ 1 callersMethodTracef
(format string, args ...any)
logrus.go:216
↓ 1 callersMethodTraceln
(args ...any)
logrus.go:217
↓ 1 callersMethodWarn
(args ...any)
logger.go:260
↓ 1 callersMethodWarn
(args ...any)
entry.go:440
↓ 1 callersMethodWarnf
(format string, args ...any)
logrus.go:202
↓ 1 callersMethodWarnf
(format string, args ...any)
logger.go:191
↓ 1 callersMethodWarnf
(format string, args ...any)
entry.go:494
↓ 1 callersMethodWarning
(args ...any)
logger.go:264
↓ 1 callersMethodWarningFn
(fn LogFunction)
logger.go:307
↓ 1 callersMethodWarningf
(format string, args ...any)
logrus.go:181
↓ 1 callersMethodWarningln
(args ...any)
logrus.go:182
↓ 1 callersMethodWarningln
(args ...any)
logger.go:363
↓ 1 callersMethodWarnln
(args ...any)
logrus.go:203
↓ 1 callersMethodWarnln
(args ...any)
logger.go:359
↓ 1 callersMethodWarnln
(args ...any)
entry.go:548
↓ 1 callersMethodWithAttrs
WithAttrs returns a new Handler whose attributes consist of h's attributes followed by attrs.
hooks/slog/handler.go:132
↓ 1 callersFunctionWithContext
WithContext creates an entry from the standard logger and adds a context to it.
exported.go:62
↓ 1 callersFunctionWithError
WithError creates an entry from the standard logger and adds an error to it, using the value defined in [ErrorKey] as key.
exported.go:57
↓ 1 callersMethodWithField
WithField allocates a new entry and adds a field to it. Debug, Print, Info, Warn, Error, Fatal or Panic must be then applied to this new returned entr
logger.go:124
↓ 1 callersMethodWrite
(p []byte)
logrus_test.go:712
↓ 1 callersMethodWriterLevel
WriterLevel returns an io.Writer that can be used to write arbitrary text to the logger at the given log level. Each line written to the writer will b
writer.go:20
↓ 1 callersMethodappendBytes
(b *bytes.Buffer, bs []byte)
text_formatter.go:396
↓ 1 callersMethodappendKeyValue
appendKeyValue writes key=value. Keys are written verbatim (unquoted/unescaped); values are subject to quoting/escaping.
text_formatter.go:309
↓ 1 callersMethodappendNumeric
(b *bytes.Buffer, out []byte)
text_formatter.go:411
↓ 1 callersMethodappendString
(b *bytes.Buffer, s string)
text_formatter.go:381
↓ 1 callersFunctioncaller1
go:noinline
entry_bench_test.go:132
↓ 1 callersFunctioncaller2
go:noinline
entry_bench_test.go:129
↓ 1 callersFunctioncaller3
go:noinline
entry_bench_test.go:126
↓ 1 callersFunctioncaller4
go:noinline
entry_bench_test.go:123
↓ 1 callersFunctiondoLoggerBenchmark
(b *testing.B, out *os.File, formatter logrus.Formatter, fields logrus.Fields)
logger_bench_test.go:32
↓ 1 callersFunctiondoLoggerBenchmarkNoLock
(b *testing.B, out *os.File, formatter logrus.Formatter, fields logrus.Fields)
logger_bench_test.go:47
↓ 1 callersMethodfireHooks
(hooks []Hook)
entry.go:380
↓ 1 callersFunctionformatLevel
(level Level, disableTrunc, pad bool, maxLen int)
level.go:40
↓ 1 callersMethodgetBufferPool
()
entry.go:373
↓ 1 callersFunctiongetCaller
getCaller retrieves the name of the first non-logrus calling function
entry.go:253
↓ 1 callersFunctiongetErr
(t *testing.T, e *logrus.Entry)
entry_test.go:361
↓ 1 callersFunctiongetPackageName
getPackageName reduces a fully qualified function name to the package name There really ought to be a better way...
entry.go:238
↓ 1 callersFunctionhasLogrusLogger
hasLogrusLogger reports whether logger has already handled the current log record while it was forwarded through slog adapters.
hooks/slog/slog.go:34
↓ 1 callersMethodhooksForLevel
hooksForLevel returns a snapshot of the hooks registered for the given level. The returned slice is a shallow copy and may be used without holding log
logger.go:422
↓ 1 callersFunctionisTerminal
(fd int)
terminal_check_bsd.go:9
↓ 1 callersMethodisTerminal
(entry *Entry)
text_formatter.go:108
↓ 1 callersFunctionlevelPrefix
(level Level, disableTrunc, pad bool)
level.go:85
↓ 1 callersFunctionlogLoop
(iterations int, reportCaller bool)
logrus_test.go:483
↓ 1 callersFunctionlogSomething
(t *testing.T, message string)
logrus_test.go:124
↓ 1 callersFunctionneedsQuoting
needsQuoting returns true if the string contains any byte that requires quoting. It returns false when every byte is "safe" according to isSafeByte.
text_formatter.go:423
↓ 1 callersFunctionneedsQuotingBytes
needsQuotingBytes returns true if the byte slice contains any byte that requires quoting. It returns false when every byte is "safe" according to isSa
text_formatter.go:437
↓ 1 callersMethodprintColored
(b *bytes.Buffer, entry *Entry, keys []string, data Fields)
text_formatter.go:248
↓ 1 callersMethodprintPlain
(b *bytes.Buffer, entry *Entry, keys []string, data Fields)
text_formatter.go:173
↓ 1 callersFunctionrunEntryLoggerRace
(t *testing.T, mutate func(logger *logrus.Logger))
entry_test.go:426
↓ 1 callersFunctionrunHandler
(handler func())
alt_exit.go:32
↓ 1 callersFunctiontoLogrusLevel
toLogrusLevel maps a slog level using the default mapping.
hooks/slog/level.go:77
↓ 1 callersFunctiontoSlogLevel
toSlogLevel maps a Logrus level using the default mapping.
hooks/slog/level.go:99
↓ 1 callersMethodtoSlogLevel
toSlogLevel maps a Logrus level using LevelMapper or the default mapping.
hooks/slog/slog.go:85
↓ 1 callersFunctionunsetEnv
unsetEnv calls [os.Unsetenv] to unset an environment variable if it is set, and uses t.Cleanup to restore the environment variable to its original val
text_formatter_test.go:522
↓ 1 callersFunctionwithLogrusLogger
withLogrusLogger returns a context that records logger as having already handled the current log record.
hooks/slog/slog.go:22
↓ 1 callersMethodwrite
()
entry.go:389
← previousnext →101–200 of 506, ranked by callers