Import std.log.logger
std.log.logger
Logger, which writes lines for a module at levels, with fields, to a LogOutput: the default one, which writes readable lines to stderr at the levels FB_LOG sets, or one the program makes, with sinks of its own. Loggers and LogOutputs are Shared Classes, so any thread can log, and a Logger with a field is a new Logger, so threads never change one another's.
std/log/logger.fb
Types
Logger
class
Public Shared Class Logger
Writes lines for a module, with the fields it's given, at levels, to an output. Its Trace, Debug, Info, Warn, and Error write a line at their level, when the output's filter writes that level for the module.
-
A Logger for
module, a name like "net.http" whose dots say what it's in, which writes to the default output. -
A Logger for
modulethat writes tooutput. -
The module it writes for.
-
The fields each of its lines has, in the order they were given.
-
A Logger like this one whose lines have the field too, after its others.
-
An integer of each of the eight types, as its number.
-
A Logger whose lines have the field
name, ofvalue's number, beside this one's. -
A Logger whose lines have the field
name, ofvalue's number, beside this one's. -
A Logger whose lines have the field
name, ofvalue's number, beside this one's. -
A Logger whose lines have the field
name, ofvalue's number, beside this one's. -
A Logger whose lines have the field
name, ofvalue's number, beside this one's. -
A Logger whose lines have the field
name, ofvalue's number, beside this one's. -
A Logger whose lines have the field
name, ofvalue's number, beside this one's. -
A Double that isn't finite is text, since JSON has no number for it: "inf", "-inf", or "nan", whatever a NaN's sign bit.
-
A Logger whose lines have the field
name, true or false, beside this one's. -
Whether a line at
levelwould be written, so code can leave out work that only a line would use. -
Writes
messageatlevel, now, when the output's filter writes it. -
Writes
messageat TRACE, as Log does. -
Writes
messageat DEBUG, as Log does. -
Writes
messageat INFO, as Log does. -
Writes
messageat WARN, as Log does. -
Writes
messageat ERROR, as Log does.
Functions
DefaultLogOutput
function
Public Function DefaultLogOutput(): LogOutput
The default output, made the first time a Logger uses it: the console's sink, at the levels FB_LOG sets, or at INFO when it isn't set. An FB_LOG that isn't a filter is said once on stderr, and left out.
Report an issue with this page or with FutureBlitz on GitHub.