MCPcopy Create free account

hub / github.com/sirupsen/logrus / functions

Functions525 in github.com/sirupsen/logrus

↓ 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:531
↓ 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:373
↓ 1 callersMethodwriterScanner
writerScanner scans the input from the reader and writes it to the logger
writer.go:64
FunctionBenchmarkBoolTextFormatter
(b *testing.B)
formatter_bench_test.go:108
FunctionBenchmarkDummyLogger
(b *testing.B)
logger_bench_test.go:14
FunctionBenchmarkDummyLoggerNoLock
(b *testing.B)
logger_bench_test.go:23
FunctionBenchmarkEntry_NewEntry
BenchmarkEntry_NewEntry measures the cost of creating entries that are not subsequently logged.
entry_bench_test.go:14
FunctionBenchmarkEntry_ReportCaller_NoCaller
(b *testing.B)
entry_bench_test.go:270
FunctionBenchmarkEntry_ReportCaller_NoCaller_Depth4
(b *testing.B)
entry_bench_test.go:311
FunctionBenchmarkEntry_ReportCaller_WithCaller
(b *testing.B)
entry_bench_test.go:271
FunctionBenchmarkEntry_ReportCaller_WithCaller_Depth4
(b *testing.B)
entry_bench_test.go:315
FunctionBenchmarkEntry_WithError
BenchmarkEntry_WithError compares the ways an error can be added to an Entry.
entry_bench_test.go:37
FunctionBenchmarkEntry_WithField_Chain
(b *testing.B)
entry_bench_test.go:70
FunctionBenchmarkEntry_WithField_Chain_Disabled
BenchmarkEntry_WithField_Chain_Disabled measures the cost of constructing a chain of fields when the resulting log call is disabled by the log level.
entry_bench_test.go:94
FunctionBenchmarkEntry_WithField_Chain_Enabled
BenchmarkEntry_WithField_Chain_Enabled measures the cost of constructing and logging a chain of fields when the log level is enabled.
entry_bench_test.go:118
FunctionBenchmarkEntry_WithFields
(b *testing.B)
entry_bench_test.go:141
FunctionBenchmarkEntry_WithFields_Reused
BenchmarkEntry_WithFields_Reused measures logging through an Entry that was constructed once with fields and reused across multiple log calls.
entry_bench_test.go:193
FunctionBenchmarkErrorTextFormatter
(b *testing.B)
formatter_bench_test.go:116
FunctionBenchmarkLargeColoredTextFormatter
(b *testing.B)
formatter_bench_test.go:132
FunctionBenchmarkLargeJSONFormatter
(b *testing.B)
formatter_bench_test.go:140
FunctionBenchmarkLargeTextFormatter
(b *testing.B)
formatter_bench_test.go:124
FunctionBenchmarkLoggerJSONFormatter
(b *testing.B)
logger_bench_test.go:92
FunctionBenchmarkLoggerLog
(b *testing.B)
logger_bench_test.go:63
FunctionBenchmarkLoggerTextFormatter
(b *testing.B)
logger_bench_test.go:96
FunctionBenchmarkNumericTextFormatter
(b *testing.B)
formatter_bench_test.go:104
FunctionBenchmarkOneBoolTextFormatter
(b *testing.B)
formatter_bench_test.go:100
FunctionBenchmarkOneNumericTextFormatter
(b *testing.B)
formatter_bench_test.go:96
FunctionBenchmarkOneStringTextFormatter
(b *testing.B)
formatter_bench_test.go:92
FunctionBenchmarkSmallColoredTextFormatter
(b *testing.B)
formatter_bench_test.go:128
FunctionBenchmarkSmallJSONFormatter
(b *testing.B)
formatter_bench_test.go:136
FunctionBenchmarkSmallTextFormatter
(b *testing.B)
formatter_bench_test.go:120
FunctionBenchmarkStringerTextFormatter
(b *testing.B)
formatter_bench_test.go:112
FunctionBenchmarkZeroTextFormatter
(b *testing.B)
formatter_bench_test.go:88
FunctionDebug
Debug logs a message at level [DebugLevel] on the standard logger.
exported.go:89
MethodDebug
(args ...any)
logger.go:246
MethodDebug
(args ...any)
entry.go:412
FunctionDebugFn
DebugFn logs a message from a func at level [DebugLevel] on the standard logger.
exported.go:135
FunctionDebugf
Debugf logs a message at level [DebugLevel] on the standard logger.
exported.go:181
MethodDebugf
(format string, args ...any)
logger.go:177
MethodDebugf
(format string, args ...any)
entry.go:466
FunctionDebugln
Debugln logs a message at level [DebugLevel] on the standard logger.
exported.go:227
MethodDebugln
(args ...any)
logger.go:345
MethodDebugln
(args ...any)
entry.go:520
MethodEnabled
(context.Context, slog.Level)
hooks/slog/slog_test.go:101
MethodError
()
entry_test.go:37
MethodError
(args ...any)
logger.go:268
MethodError
(args ...any)
entry.go:432
MethodError
()
text_formatter_test.go:697
MethodError
()
text_formatter_test.go:705
MethodError
()
text_formatter_test.go:709
FunctionErrorFn
ErrorFn logs a message from a func at level [ErrorLevel] on the standard logger.
exported.go:160
FunctionErrorf
Errorf logs a message at level [ErrorLevel] on the standard logger.
exported.go:206
MethodErrorf
(format string, args ...any)
logger.go:199
FunctionErrorln
Errorln logs a message at level [ErrorLevel] on the standard logger.
exported.go:252
MethodErrorln
(args ...any)
logger.go:367
MethodErrorln
(args ...any)
entry.go:540
FunctionExampleDefaultFieldHook
()
example_default_field_value_test.go:22
FunctionExampleGlobalHook
()
example_global_hook_test.go:22
FunctionExampleJSONFormatter_CallerPrettyfier
()
example_custom_caller_test.go:12
FunctionExampleLevel_dynamic
ExampleLevel_dynamic demonstrates using Level to share dynamic level configuration between Logrus and slog.
hooks/slog/level_example_test.go:25
FunctionExampleLogger_Writer_httpServer
()
writer_test.go:19
FunctionExampleLogger_Writer_stdlib
()
writer_test.go:35
FunctionExampleNewHandler
ExampleNewHandler demonstrates using slog alongside an existing Logrus logger.
hooks/slog/slog_example_test.go:16
FunctionExampleNewHandler_options
ExampleNewHandler_options demonstrates configuring source reporting and custom slog-to-Logrus level mapping. Logrus writes to stderr by default, so t
hooks/slog/slog_example_test.go:43
FunctionExampleNewHook
ExampleNewHook demonstrates forwarding existing Logrus logging to an slog logger, allowing applications to migrate their logging backend independently
hooks/slog/slog_example_test.go:71
FunctionExampleNewHook_migration
ExampleNewHook_migration demonstrates using both adapters while migrating from Logrus to slog. Records can cross the bridge without being forwarded ba
hooks/slog/slog_example_test.go:100
FunctionExample_basic
()
example_basic_test.go:9
FunctionExample_hook
An example on how to use a hook
example_hook_test.go:14
FunctionFatal
Fatal logs a message at level [FatalLevel] on the standard logger, then exits the process with status 1.
exported.go:125
MethodFatal
(args ...any)
logger.go:272
MethodFatal
(args ...any)
entry.go:436
FunctionFatalFn
FatalFn logs a message from a func at level [FatalLevel] on the standard logger, then exits the process with status 1.
exported.go:171
FunctionFatalf
Fatalf logs a message at level [FatalLevel] on the standard logger, then exits the process with status 1.
exported.go:217
MethodFatalf
(format string, args ...any)
logger.go:203
MethodFatalf
(format string, args ...any)
entry.go:490
FunctionFatalln
Fatalln logs a message at level [FatalLevel] on the standard logger, then exits the process with status 1.
exported.go:263
MethodFatalln
(args ...any)
logger.go:371
MethodFatalln
(args ...any)
entry.go:544
MethodFire
(*logrus.Entry)
entry_test.go:24
MethodFire
(entry *logrus.Entry)
entry_test.go:326
MethodFire
(e *logrus.Entry)
example_default_field_value_test.go:17
MethodFire
(entry *Entry)
hook_test.go:40
MethodFire
(entry *Entry)
hook_test.go:74
MethodFire
(entry *Entry)
hook_test.go:161
MethodFire
(e *Entry)
hook_test.go:245
MethodFire
(e *logrus.Entry)
example_global_hook_test.go:17
MethodFire
Fire will be called when some logging function is called with current hook It will format log entry to string and write it to appropriate writer
hooks/writer/writer.go:19
MethodFire
(e *logrus.Entry)
hooks/test/test.go:47
MethodFire
(entry *logrus.Entry)
hooks/syslog/syslog.go:35
MethodFormat
(*logrus.Entry)
entry_test.go:33
MethodFormat
(entry *Entry)
hook_test.go:30
MethodGet
()
entry_test.go:28
MethodGet
()
buffer_pool.go:29
MethodGet
()
logger_test.go:42
MethodHandle
(context.Context, slog.Record)
hooks/slog/slog_test.go:105
MethodHasCaller
HasCaller reports whether this Entry contains caller information. Caller may be set explicitly, or populated at log time when [Logger.ReportCaller] i
entry.go:281
MethodInfo
(args ...any)
logger.go:250
FunctionInfoFn
InfoFn logs a message from a func at level [InfoLevel] on the standard logger.
exported.go:145
FunctionInfof
Infof logs a message at level [InfoLevel] on the standard logger.
exported.go:191
← previousnext →201–300 of 525, ranked by callers