MCPcopy Create free account

hub / github.com/sirupsen/logrus / functions

Functions525 in github.com/sirupsen/logrus

MethodInfof
(format string, args ...any)
logger.go:181
FunctionInfoln
Infoln logs a message at level [InfoLevel] on the standard logger.
exported.go:237
MethodInfoln
(args ...any)
logger.go:349
FunctionIsLevelEnabled
IsLevelEnabled checks if logging for the given level is enabled for the standard logger.
exported.go:46
MethodLevel
()
hooks/slog/level_example_test.go:19
MethodLevel
Level returns l mapped to the corresponding slog level.
hooks/slog/level.go:47
MethodLevel
Level returns l mapped to the corresponding Logrus level.
hooks/slog/level.go:70
MethodLevels
()
entry_test.go:23
MethodLevels
()
entry_test.go:322
MethodLevels
()
example_default_field_value_test.go:13
MethodLevels
()
hook_test.go:45
MethodLevels
()
hook_test.go:80
MethodLevels
()
hook_test.go:122
MethodLevels
()
hook_test.go:166
MethodLevels
()
hook_test.go:241
MethodLevels
()
example_global_hook_test.go:13
MethodLevels
Levels define on which log levels this hook would trigger
hooks/writer/writer.go:29
MethodLevels
()
hooks/test/test.go:54
MethodLevels
Levels always returns all levels, since slog allows controlling level enabling based on context.
hooks/slog/slog.go:94
MethodMarshalJSON
()
entry_test.go:536
FunctionNewHandler
NewHandler creates a [slog.Handler] that writes to the provided [logrus.Logger]. The provided logger must not be nil. NewHandler panics if logger is
hooks/slog/handler.go:56
FunctionNewHook
NewHook creates a [logrus.Hook] that sends logs to the provided [slog.Logger]. This hook is intended to be used during transition from Logrus to slog
hooks/slog/slog.go:71
FunctionNewSyslogHook
NewSyslogHook creates a hook to be added to an instance of logger. This is called with: hook, err := NewSyslogHook("udp", "localhost:514", syslog.L
hooks/syslog/syslog.go:30
FunctionPanic
Panic logs a message at level [PanicLevel] on the standard logger.
exported.go:119
MethodPanic
(args ...any)
logger.go:277
MethodPanic
(args ...any)
entry.go:441
FunctionPanicFn
PanicFn logs a message from a func at level [PanicLevel] on the standard logger.
exported.go:165
FunctionPanicf
Panicf logs a message at level [PanicLevel] on the standard logger.
exported.go:211
MethodPanicf
(format string, args ...any)
logger.go:208
MethodPanicf
(format string, args ...any)
entry.go:495
FunctionPanicln
Panicln logs a message at level [PanicLevel] on the standard logger.
exported.go:257
MethodPanicln
(args ...any)
logger.go:376
MethodPanicln
(args ...any)
entry.go:549
FunctionPrint
Print logs a message at level [InfoLevel] on the standard logger.
exported.go:94
MethodPrint
(args ...any)
logger.go:254
MethodPrint
(args ...any)
entry.go:416
FunctionPrintFn
PrintFn logs a message from a func at level [InfoLevel] on the standard logger.
exported.go:140
FunctionPrintf
Printf logs a message at level [InfoLevel] on the standard logger.
exported.go:186
MethodPrintf
(format string, args ...any)
logger.go:185
MethodPrintf
(format string, args ...any)
entry.go:474
FunctionPrintln
Println logs a message at level [InfoLevel] on the standard logger.
exported.go:232
MethodPrintln
(args ...any)
logger.go:353
MethodPrintln
(args ...any)
entry.go:528
MethodPut
(*bytes.Buffer)
entry_test.go:29
MethodPut
(buf *bytes.Buffer)
buffer_pool.go:25
MethodPut
(buf *bytes.Buffer)
logger_test.go:47
MethodRead
(p []byte)
writer_test.go:56
FunctionSetBufferPool
SetBufferPool allows to replace the default logrus buffer pool to better meet the specific needs of an application.
buffer_pool.go:35
FunctionSetFormatter
SetFormatter sets the standard logger formatter.
exported.go:25
FunctionSetReportCaller
SetReportCaller sets whether the standard logger will include the calling method as a field.
exported.go:31
MethodString
()
formatter_bench_test.go:14
MethodString
()
text_formatter_test.go:701
MethodString
()
text_formatter_test.go:717
FunctionTestAddHookRace
(t *testing.T)
hook_test.go:194
FunctionTestAddHookRace2
(t *testing.T)
hook_test.go:215
FunctionTestAllHooks
(t *testing.T)
hooks/test/test_test.go:15
FunctionTestCallerReportingOverhead
Assertions for upper bounds to reporting overhead
logrus_test.go:510
FunctionTestCanFireMultipleHooks
(t *testing.T)
hook_test.go:103
FunctionTestConvertLevelToString
(t *testing.T)
logrus_test.go:530
FunctionTestCustomSorting
(t *testing.T)
text_formatter_test.go:542
FunctionTestCustomSorting_FirstFormat
TestCustomSorting_FirstFormat tests that color and terminal settings are performed on the first message, and the message is properly formatted with de
text_formatter_test.go:578
FunctionTestDefaultFieldsAreNotPrefixed
(t *testing.T)
logrus_test.go:331
FunctionTestDefer
(t *testing.T)
alt_exit_test.go:46
FunctionTestDifferentLevelsGoToDifferentWriters
(t *testing.T)
hooks/writer/writer_test.go:13
FunctionTestDisableLevelTruncation
(t *testing.T)
text_formatter_test.go:202
FunctionTestDisableTimestampWithColoredOutput
(t *testing.T)
text_formatter_test.go:330
FunctionTestDoubleLoggingDoesntPrefixPreviousFields
(t *testing.T)
logrus_test.go:404
FunctionTestEntryDataIsMutable
TestEntryDataIsMutable verifies that Entry.Data exposes materialized fields, can be modified directly, and remains isolated between derived entries.
entry_test.go:609
FunctionTestEntryDerivationPreservesCaller
TestEntryDerivationPreservesCaller verifies that derived entries retain explicitly set caller information.
entry_test.go:355
FunctionTestEntryErrorFieldValues
TestEntryErrorFieldValues verifies that error fields are accepted, rejected, and formatted consistently across WithError, WithField, and WithFields.
entry_test.go:64
FunctionTestEntryHooksPanic
(t *testing.T)
entry_test.go:334
FunctionTestEntryLogPanicLevelDoesNotPanic
TestEntryLogPanicLevelDoesNotPanic verifies that generic Log methods treat PanicLevel as severity only and do not trigger panic behavior. Regression
entry_test.go:210
FunctionTestEntryLogfLevel
(t *testing.T)
entry_test.go:445
FunctionTestEntryLoggerMutationRace
(t *testing.T)
entry_test.go:459
FunctionTestEntryPanic
(t *testing.T)
entry_test.go:293
FunctionTestEntryPanicf
(t *testing.T)
entry_test.go:271
FunctionTestEntryPanicln
(t *testing.T)
entry_test.go:249
FunctionTestEntryReentrantLoggingDeadlock
TestEntryReentrantLoggingDeadlock verifies that logging from within a field's MarshalJSON (or similar serialization callback) does not deadlock. This
entry_test.go:544
FunctionTestEntryWithContext
(t *testing.T)
entry_test.go:136
FunctionTestEntryWithContextPreservesData
(t *testing.T)
entry_test.go:150
FunctionTestEntryWithError
(t *testing.T)
entry_test.go:41
FunctionTestEntryWithFieldsThenBranch
TestEntryWithFieldsThenBranch verifies that an Entry with fields can be logged, used as the parent of a derived Entry, and reused without inheriting f
entry_test.go:573
FunctionTestEntryWithIncorrectField
(t *testing.T)
entry_test.go:405
FunctionTestEntryWithTimePreservesData
(t *testing.T)
entry_test.go:181
FunctionTestEntryWriter
(t *testing.T)
logrus_test.go:730
FunctionTestErrorHookShouldFireOnError
(t *testing.T)
hook_test.go:183
FunctionTestErrorHookShouldntFireOnInfo
(t *testing.T)
hook_test.go:172
FunctionTestErrorNotLost
(t *testing.T)
json_formatter_test.go:33
FunctionTestErrorNotLostOnFieldNotNamedError
(t *testing.T)
json_formatter_test.go:43
FunctionTestEscaping
(t *testing.T)
text_formatter_test.go:150
FunctionTestFatalWithAlternateExit
nolint:staticcheck // linter assumes logger.Fatal exits, resulting in false SA4006 warnings.
hooks/test/test_test.go:86
FunctionTestFieldClashWithCaller
(t *testing.T)
json_formatter_test.go:337
FunctionTestFieldClashWithLevel
(t *testing.T)
json_formatter_test.go:78
FunctionTestFieldClashWithMsg
(t *testing.T)
json_formatter_test.go:68
FunctionTestFieldClashWithRemappedFields
(t *testing.T)
json_formatter_test.go:88
FunctionTestFieldClashWithTime
(t *testing.T)
json_formatter_test.go:53
FunctionTestFieldDoesNotClashWithCaller
(t *testing.T)
json_formatter_test.go:317
FunctionTestFieldsInNestedDictionary
(t *testing.T)
json_formatter_test.go:132
FunctionTestFormatting
(t *testing.T)
text_formatter_test.go:19
FunctionTestGetSetLevelRace
(t *testing.T)
logrus_test.go:615
← previousnext →301–400 of 525, ranked by callers