Docs (4.0.0)
Errors and logging

class LogWriter

A class that handles log messages, part of the global application context.

class LogWriter

Description

An instance of this class is available as app.log. You can use methods on that instance to write messages to the application log.

Different methods are available for different severity levels, ranging from verbose (level 0) to fatal (level 5).

Log messages are emitted as events on LogWriter.emitter. A listener can be added there, or using app.addLogHandler() to add a log ‘sink’ for a minimum severity level. If no listeners have been added, log messages are written to the console.

Type Members

Instance Members

More information

For more information, refer to the following page:

  • Errors and loggingUnderstand how errors are handled, and how you can use built-in logging features to help observe and debug your application.