JSMA log

Overview

The JSMA log provides functionality for writing to a log file.

What can JSMA logdo for me?

You could easily use the JSMA log to create a log-entry

Index

Usage

writing data

Here is an example on how to write data to the JSMA log file:

...
log.error(message, [options])
...

Methods

The JSMA log provides the following methods:

log.debug(message, [options])

Writes the message into the log file with level debug

Example

...
log.debug(message, [options])
...

Parameter message:string (required)

Parameter options:object (optional)

May have a key 'broadcastEvent':bool which determines whether the log message shows up in the websocket log view.

log.error(message, [options])

Writes the message into the log file with level error

Example

...
log.error(message, [options])
...

Parameter message (required)

Parameter options (optional)

May have a key 'broadcastEvent':bool which determines whether the log message shows up in the websocket log view.

log.fatal(message, [options])

Writes the message into the log file with level fatal

Example

...
log.fatal(message, [options]) 
...

Parameter message (required)

Parameter options (optional)

May have a key 'broadcastEvent':bool which determines whether the log message shows up in the websocket log view.

log.info(message, [options])

Writes the message into the logfile with level info

Example

...
log.info(message, [options]) 
...

Parameter message (required)

Parameter options (optional)

May have a key 'broadcastEvent':bool which determines whether the log message shows up in the websocket log view.

log.warn(message, [options])

Writes the message into the log file with level warning

Example

...
log.warn(message, [options])
...

Parameter message (required)

Parameter options (optional)

May have a key 'broadcastEvent':bool which determines whether the log message shows up in the websocket log view.

log.write(type, message, [options])

Writes the message into the log file with the given level (type)

Example

...
 log.write(type, message, [options])
...

Parameter type (required)

Parameter message (required)

Parameter options (optional)

May have a key 'broadcastEvent':bool which determines whether the log message shows up in the websocket log view.