Interface ILogger
interface ILogger
Extends IStandard
Core Hierarchical logger interface.
The process object implements this interface, and component-specific
logger objects can also implement this interface. The logger will be
created with a dot separated name.
Ex:
Methods
log()
Emit a log message.voidlog(LogLevellevel,stringmessage,IError?associatedError)
Parameters
level
LogLevel — Required
severity level
message
string — Required
log message
associatedError
IError? — Optional
if present, error objects
that caused this log message.
Formatting is implementation specific.
isEnabled()
Check if this severity level is enabled.boolisEnabled(LogLevellevel)
Parameters
level
LogLevel — Required
Severity level
Returns
bool
whether logging is enabled for this level
getChild()
Get a sub-logger from this logger. Hierarchical loggers are organized in a dot separated manner, much like Python or Java modules are organized. The name has to adhere to the same lexical structure as APMF2 package name. This method is designed for creating component-specific loggers based on the global process object logger. These components then log their messages to their respective loggers. For instance, a graphics library could establish its own dedicated logger derived from the global logger. The method is also idempotent, calling it multiple times will yield the same object.ILogger*getChild(stringsuffix)
Parameters
suffix
string — Required
logging namespace suffix
Returns
ILogger*
new logger instance

