Skip to content

Commit 4578ad2

Browse files
Add examples for disabling logging (#33807)
1 parent 2f326f7 commit 4578ad2

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

base/logging.jl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,12 @@ Severity/verbosity of a log record.
105105
The log level provides a key against which potential log records may be
106106
filtered, before any other work is done to construct the log record data
107107
structure itself.
108+
109+
# Examples
110+
```
111+
julia> Logging.LogLevel(0) == Logging.Info
112+
true
113+
```
108114
"""
109115
struct LogLevel
110116
level::Int32
@@ -420,6 +426,11 @@ end
420426
Disable all log messages at log levels equal to or less than `level`. This is
421427
a *global* setting, intended to make debug logging extremely cheap when
422428
disabled.
429+
430+
# Examples
431+
```
432+
Logging.disable_logging(Logging.Info) # Disable debug and info
433+
```
423434
"""
424435
function disable_logging(level::LogLevel)
425436
_min_enabled_level[] = level + 1

0 commit comments

Comments
 (0)