Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/sirupsen/logrus
/ functions
Functions
525 in github.com/sirupsen/logrus
⨍
Functions
525
◇
Types & classes
65
Method
Infof
(format string, args ...any)
logger.go:181
Function
Infoln
Infoln logs a message at level [InfoLevel] on the standard logger.
exported.go:237
Method
Infoln
(args ...any)
logger.go:349
Function
IsLevelEnabled
IsLevelEnabled checks if logging for the given level is enabled for the standard logger.
exported.go:46
Method
Level
()
hooks/slog/level_example_test.go:19
Method
Level
Level returns l mapped to the corresponding slog level.
hooks/slog/level.go:47
Method
Level
Level returns l mapped to the corresponding Logrus level.
hooks/slog/level.go:70
Method
Levels
()
entry_test.go:23
Method
Levels
()
entry_test.go:322
Method
Levels
()
example_default_field_value_test.go:13
Method
Levels
()
hook_test.go:45
Method
Levels
()
hook_test.go:80
Method
Levels
()
hook_test.go:122
Method
Levels
()
hook_test.go:166
Method
Levels
()
hook_test.go:241
Method
Levels
()
example_global_hook_test.go:13
Method
Levels
Levels define on which log levels this hook would trigger
hooks/writer/writer.go:29
Method
Levels
()
hooks/test/test.go:54
Method
Levels
Levels always returns all levels, since slog allows controlling level enabling based on context.
hooks/slog/slog.go:94
Method
MarshalJSON
()
entry_test.go:536
Function
NewHandler
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
Function
NewHook
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
Function
NewSyslogHook
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
Function
Panic
Panic logs a message at level [PanicLevel] on the standard logger.
exported.go:119
Method
Panic
(args ...any)
logger.go:277
Method
Panic
(args ...any)
entry.go:441
Function
PanicFn
PanicFn logs a message from a func at level [PanicLevel] on the standard logger.
exported.go:165
Function
Panicf
Panicf logs a message at level [PanicLevel] on the standard logger.
exported.go:211
Method
Panicf
(format string, args ...any)
logger.go:208
Method
Panicf
(format string, args ...any)
entry.go:495
Function
Panicln
Panicln logs a message at level [PanicLevel] on the standard logger.
exported.go:257
Method
Panicln
(args ...any)
logger.go:376
Method
Panicln
(args ...any)
entry.go:549
Function
Print
Print logs a message at level [InfoLevel] on the standard logger.
exported.go:94
Method
Print
(args ...any)
logger.go:254
Method
Print
(args ...any)
entry.go:416
Function
PrintFn
PrintFn logs a message from a func at level [InfoLevel] on the standard logger.
exported.go:140
Function
Printf
Printf logs a message at level [InfoLevel] on the standard logger.
exported.go:186
Method
Printf
(format string, args ...any)
logger.go:185
Method
Printf
(format string, args ...any)
entry.go:474
Function
Println
Println logs a message at level [InfoLevel] on the standard logger.
exported.go:232
Method
Println
(args ...any)
logger.go:353
Method
Println
(args ...any)
entry.go:528
Method
Put
(*bytes.Buffer)
entry_test.go:29
Method
Put
(buf *bytes.Buffer)
buffer_pool.go:25
Method
Put
(buf *bytes.Buffer)
logger_test.go:47
Method
Read
(p []byte)
writer_test.go:56
Function
SetBufferPool
SetBufferPool allows to replace the default logrus buffer pool to better meet the specific needs of an application.
buffer_pool.go:35
Function
SetFormatter
SetFormatter sets the standard logger formatter.
exported.go:25
Function
SetReportCaller
SetReportCaller sets whether the standard logger will include the calling method as a field.
exported.go:31
Method
String
()
formatter_bench_test.go:14
Method
String
()
text_formatter_test.go:701
Method
String
()
text_formatter_test.go:717
Function
TestAddHookRace
(t *testing.T)
hook_test.go:194
Function
TestAddHookRace2
(t *testing.T)
hook_test.go:215
Function
TestAllHooks
(t *testing.T)
hooks/test/test_test.go:15
Function
TestCallerReportingOverhead
Assertions for upper bounds to reporting overhead
logrus_test.go:510
Function
TestCanFireMultipleHooks
(t *testing.T)
hook_test.go:103
Function
TestConvertLevelToString
(t *testing.T)
logrus_test.go:530
Function
TestCustomSorting
(t *testing.T)
text_formatter_test.go:542
Function
TestCustomSorting_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
Function
TestDefaultFieldsAreNotPrefixed
(t *testing.T)
logrus_test.go:331
Function
TestDefer
(t *testing.T)
alt_exit_test.go:46
Function
TestDifferentLevelsGoToDifferentWriters
(t *testing.T)
hooks/writer/writer_test.go:13
Function
TestDisableLevelTruncation
(t *testing.T)
text_formatter_test.go:202
Function
TestDisableTimestampWithColoredOutput
(t *testing.T)
text_formatter_test.go:330
Function
TestDoubleLoggingDoesntPrefixPreviousFields
(t *testing.T)
logrus_test.go:404
Function
TestEntryDataIsMutable
TestEntryDataIsMutable verifies that Entry.Data exposes materialized fields, can be modified directly, and remains isolated between derived entries.
entry_test.go:609
Function
TestEntryDerivationPreservesCaller
TestEntryDerivationPreservesCaller verifies that derived entries retain explicitly set caller information.
entry_test.go:355
Function
TestEntryErrorFieldValues
TestEntryErrorFieldValues verifies that error fields are accepted, rejected, and formatted consistently across WithError, WithField, and WithFields.
entry_test.go:64
Function
TestEntryHooksPanic
(t *testing.T)
entry_test.go:334
Function
TestEntryLogPanicLevelDoesNotPanic
TestEntryLogPanicLevelDoesNotPanic verifies that generic Log methods treat PanicLevel as severity only and do not trigger panic behavior. Regression
entry_test.go:210
Function
TestEntryLogfLevel
(t *testing.T)
entry_test.go:445
Function
TestEntryLoggerMutationRace
(t *testing.T)
entry_test.go:459
Function
TestEntryPanic
(t *testing.T)
entry_test.go:293
Function
TestEntryPanicf
(t *testing.T)
entry_test.go:271
Function
TestEntryPanicln
(t *testing.T)
entry_test.go:249
Function
TestEntryReentrantLoggingDeadlock
TestEntryReentrantLoggingDeadlock verifies that logging from within a field's MarshalJSON (or similar serialization callback) does not deadlock. This
entry_test.go:544
Function
TestEntryWithContext
(t *testing.T)
entry_test.go:136
Function
TestEntryWithContextPreservesData
(t *testing.T)
entry_test.go:150
Function
TestEntryWithError
(t *testing.T)
entry_test.go:41
Function
TestEntryWithFieldsThenBranch
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
Function
TestEntryWithIncorrectField
(t *testing.T)
entry_test.go:405
Function
TestEntryWithTimePreservesData
(t *testing.T)
entry_test.go:181
Function
TestEntryWriter
(t *testing.T)
logrus_test.go:730
Function
TestErrorHookShouldFireOnError
(t *testing.T)
hook_test.go:183
Function
TestErrorHookShouldntFireOnInfo
(t *testing.T)
hook_test.go:172
Function
TestErrorNotLost
(t *testing.T)
json_formatter_test.go:33
Function
TestErrorNotLostOnFieldNotNamedError
(t *testing.T)
json_formatter_test.go:43
Function
TestEscaping
(t *testing.T)
text_formatter_test.go:150
Function
TestFatalWithAlternateExit
nolint:staticcheck // linter assumes logger.Fatal exits, resulting in false SA4006 warnings.
hooks/test/test_test.go:86
Function
TestFieldClashWithCaller
(t *testing.T)
json_formatter_test.go:337
Function
TestFieldClashWithLevel
(t *testing.T)
json_formatter_test.go:78
Function
TestFieldClashWithMsg
(t *testing.T)
json_formatter_test.go:68
Function
TestFieldClashWithRemappedFields
(t *testing.T)
json_formatter_test.go:88
Function
TestFieldClashWithTime
(t *testing.T)
json_formatter_test.go:53
Function
TestFieldDoesNotClashWithCaller
(t *testing.T)
json_formatter_test.go:317
Function
TestFieldsInNestedDictionary
(t *testing.T)
json_formatter_test.go:132
Function
TestFormatting
(t *testing.T)
text_formatter_test.go:19
Function
TestGetSetLevelRace
(t *testing.T)
logrus_test.go:615
← previous
next →
301–400 of 525, ranked by callers