File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change 230
230
This is basically a special case of the early filtered logger,
231
231
that just checks if the level of the message is above the level specified when it was created.
232
232
233
+ ### Demo: filter out all the log messages that are less severe than `Error`
234
+
235
+ ``` julia
236
+ julia> using Logging, LoggingExtras
237
+
238
+ julia> error_only_logger = MinLevelLogger (current_logger (), Logging. Error);
239
+
240
+ julia> with_logger (error_only_logger) do
241
+ @info (" You won't see this" )
242
+ @warn (" won't see this either" )
243
+ @error (" You will only see this" )
244
+ end
245
+ ┌ Error: You will only see this
246
+ └ @ Main REPL[18 ]: 4
247
+ ```
248
+
233
249
## `TransformerLogger`
234
250
The transformer logger allows for the modification of log messages.
235
251
This modification includes such things as its log level, and content,
You can’t perform that action at this time.
0 commit comments