Readonly
aftReadonly
loggera name unique to a given AftLogger
instance intended to uniquely identify output by
the associated class doing the logging
allows for filtering out of erroneous information from logs by assigning values to different types of logging. the purpose of each log level is as follows:
trace
- used by AFT internal systems or debug events that would be very chatty (for ex: occur within a loop)debug
- used for debug logging that does not run within a loop or at a high frequencyinfo
- used for informational events providing current state of a systemstep
- used within a test to denote where within the test steps we arewarn
- used for unexpected errors that are recoverablepass
- used to indicate the success of a test expectation or assertionfail
- used to indicate the failure of a test expectation or assertionerror
- used for unexpected errors that are not recoverablenone
- used when no logging is desired (disables logging)formats the passed in LogMessage.message
based on the passed in options
a LogMessage
object containing the level
, name
and message
to
be formatted into a console-friendly log string
the formatted log string
function will check that the level
is greater or equal to the current configured logLevel
and if it is, will send the name
, level
and message
to the console. if the args
array
is included and has a length greater than 0 each item will be converted to a string using
JSON.stringify(...)
and appended to the message
a LogMessageData
object containing details of the log message, level, name
and any additional arguments to be logged
applies a colour based on the supplied level
and outputs the message
to the console using console.log
in that colour
calling this function directly will bypass checking the
level
to see if themessage
should actually be logged and simply outputs to the console
a valid {LogLevel} like 'warn' or 'trace'
the message string to log to console
Generated using TypeDoc
a logging class that uses configuration to determine what should be logged to the console and formats the logging output to indicate the source of the logging data. Configuration for this class can be passed in directly or specified in
aftconfig.json
like:NOTE: this should only be used in cases where using
ReportingManager
would not be reasonable such as inside core components of AFT; otherwise you should use aReportingManager
instance instead