type
Log
Log provides a simple, but standardized mechanism for logging.
constructors
make |
Create a new log by name. |
---|
fields
level |
The log level field defines which log entries are reported versus ignored. |
---|
methods
addHandler |
Install a handler to receive callbacks on logging events. |
---|---|
debug |
Generate a |
err |
Generate a |
find |
Find a registered log by name. |
get |
Find an existing registered log by name or if not found then create a new registered Log instance with the given name. |
handlers |
List all the handler functions installed to process log events. |
info |
Generate a |
isDebug |
Return if debug level is enabled. |
isEnabled |
Return if this log is enabled for the specified level. |
isErr |
Return if error level is enabled. |
isInfo |
Return if info level is enabled. |
isWarn |
Return if warn level is enabled. |
list |
Return a list of all the active logs which have been registered since system startup. |
log |
Publish a log entry. |
name |
Return name of the log. |
removeHandler |
Uninstall a log handler. |
toStr |
Return name. |
warn |
Generate a |
Slot Details
addHandler
debug
src
Void debug(Str msg, Err? err := null)
Generate a LogLevel.debug
log entry.
err
src
Void err(Str msg, Err? err := null)
Generate a LogLevel.err
log entry.
find
get
Find an existing registered log by name or if not found then create a new registered Log instance with the given name. Name must be valid according to Uri.isName
otherwise NameErr is thrown.
handlers
info
src
Void info(Str msg, Err? err := null)
Generate a LogLevel.info
log entry.
isDebug
isEnabled
isErr
isInfo
isWarn
level
list
log
make
src
new make(Str name, Bool register)
Create a new log by name. The log is added to the VM log registry only if register
is true. If register is true and a log has already been created for the specified name then throw ArgErr. Name must be valid according to Uri.isName
otherwise NameErr is thrown.
name
removeHandler
toStr
warn
src
Void warn(Str msg, Err? err := null)
Generate a LogLevel.warn
log entry.