Import std.log.output
LogOutput
class
Public Shared Class LogOutput
Where Loggers' lines go: to each of its sinks, in the order they were added, once its filter writes the line's level for its module. Each sink gets the lines of every thread that logs, at once, so it must take them at once, as the console's does.
Examples
Local output = LogOutput(LogFilter.At(LogLevel.WARN))
Expect(!output.Allows("app", LogLevel.INFO) && output.Allows("app", LogLevel.ERROR))
output.Filter = LogFilter.At(LogLevel.DEBUG)
Expect(output.Allows("app", LogLevel.INFO))
// A record goes to each sink; with none, it goes nowhere.
output.Write(LogRecord(Timestamp.Now(), LogLevel.INFO, "app", "quiet"))-
An output with no sinks, whose filter is
filter. -
Adds
sink, which each line written after this goes to, after the sinks added before it. -
Takes every sink out, so lines go nowhere until one is added.
-
The filter, which says what's written, or a new one, which the lines logged after it go by.
-
Whether its filter writes a line at
levelformodule. -
Gives
recordto each sink, if its filter writes it. The sinks are called outside the lock, so one can log, or add a sink, which the next line goes to.
Report an issue with this page or with FutureBlitz on GitHub.