API Docs for:
Show:

arch_logger Class

Module: logger

The architect module that offers the logger.

Methods

config

()

Configure the component.

getErrorCounter

() Number

Returns the number of the error log entries.

Returns:

Number:

The number of the error log entries.

getTimestamp

() String

Return a string representation of the date and time.

Returns:

String:

A date and time.

getWarnCounter

() Number

Returns the number of the warning log entries.

Returns:

Number:

The number of the warning log entries.

on

(
  • type
  • cb
)
Object

Subscribe a callback function to a custom event fired by this object. It's the same of nodejs events.EventEmitter.on method.

Parameters:

  • type String

    The name of the event

  • cb Function

    The callback to execute in response to the event

Returns:

Object:

A subscription handle capable of detaching that subscription.

reload

()

Reload the component.

Properties

ctilog

Object static

The logger to be used by other components.

Default: {}

emitter

Object private

The event emitter.

errorCounter

Number private

The number of the error log entries.

Default: 0

EVT_RELOADED

String

The name of the reloaded event.

Default: "reloaded"

IDLOG

String private final

The module identifier used by the logger.

Default: [arch_logger]

IDLOG

String private final

The module identifier used by the logger.

Default: [logger]

PATH

String private final

The path of the JSON configuration file.

Default: "/etc/nethcti/nethcti.json"

warnCounter

Number private

The number of the warning log entries.

Default: 0

Events

reloaded

Fired when the componente has been reloaded.