Import std.log.level
LogFilter
struct
Public Struct LogFilter Implements Printable
The least level written for each module: its own, when it has one, or the nearest module's it's in, so "net.http.client" has "net.http"'s or else "net"'s, or else the base level that every other module has. It's Sendable, so a LogOutput shares it with every thread.
Examples
Local filter = LogFilter.Parse("info,net=trace,net.http=off")
Expect(filter?.LevelOf("app") == LogLevel.INFO)
Expect(filter?.LevelOf("net.tcp") == LogLevel.TRACE)
Expect(filter?.Allows("net.http.client", LogLevel.ERROR) == False)
Expect(LogFilter.At(LogLevel.WARN).With("db", LogLevel.DEBUG).ToString() == "warn,db=debug")-
Every module at
level. -
FB_LOG's
text: parts between commas, each a level, which every module gets, or a module, an '=', and its level, with spaces around them left out. Every module is at INFO unless a part says otherwise, and the last part wins. Null when a part is neither, or a module's name is empty. -
The same filter, with
module, and the modules in it that have no level of their own, atlevel. -
The level every module without one of its own has.
-
The least level written for
module: its own, or the nearest module's it's in, or the base. -
Whether a line at
level, which isn't OFF, is written formodule. -
As FB_LOG's text has it, its modules by name: "info,net=trace".
Report an issue with this page or with FutureBlitz on GitHub.