new Logger(conn, name, relevance, basicExtra)
Use it to ease logging multiple times with the same name
, relevance
and some extra
keys
Logs created this way will have the time
field set as the elapsed time (in ms) between
creation by Connection#getLogger and subsequent calls to its methods.
Keys on the basicExtra
parameter will be assigned to the extra object passed
when calling Logger methods.
Name | Type | Description |
---|---|---|
conn |
Connection | |
name |
string | |
relevance |
Connection#RELEVANCE | optional |
basicExtra |
Object | optional |
Members
-
nullablebasicExtraObject
-
Binded keys/values for
extra
-
connConnection
-
Parent connection
-
namestring
-
Binded
name
value -
nullablerelevanceConnection#RELEVANCE
-
Binded
relevance
value -
thennumber
-
The timestamp (in ms) when it was created
Methods
-
debug(message, extra)
Logger.js, line 57 -
Simpler way for Connection#sendLog with
level
set as DEBUGName Type Description message
string | Error optional extra
* optional any JSON-compatible value
-
error(message, extra)
Logger.js, line 84 -
Simpler way for Connection#sendLog with
level
set as ERRORName Type Description message
string | Error optional extra
* optional any JSON-compatible value
-
fatal(message, extra)
Logger.js, line 93 -
Simpler way for Connection#sendLog with
level
set as FATALName Type Description message
string | Error optional extra
* optional any JSON-compatible value
-
info(message, extra)
Logger.js, line 66 -
Simpler way for Connection#sendLog with
level
set as INFOName Type Description message
string | Error optional extra
* optional any JSON-compatible value
-
warn(message, extra)
Logger.js, line 75 -
Simpler way for Connection#sendLog with
level
set as WARNName Type Description message
string | Error optional extra
* optional any JSON-compatible value