new mmir.tools.Logger(theName, theLevel)
Constructor-Method of Class Logger
| Name | Type | Description |
|---|---|---|
theName |
String | the name / ID for the logger |
theLevel |
String | Number | optional OPTIONAL the log-level. If omitted, the logger will use the default log-level |
- See:
-
getAsLevelgetLevel
Methods
-
c(className, funcName, msg, error)
-
Alias for
critical.Name Type Description classNameString optional OPTIONAL the name of the class/object from which the logging is invoked from funcNameString optional OPTIONAL the name of the function (within the class) from which the logging is invoked from msgString the log message errorError optional OPTIONAL an error object: if available, its message and error-stack will be print to the output -
critical(className, funcName, msg, error)
-
Print a critical (exception) log message, if at least
critical(5) log-level is set.Name Type Description classNameString optional OPTIONAL the name of the class/object from which the logging is invoked from funcNameString optional OPTIONAL the name of the function (within the class) from which the logging is invoked from msgString the log message errorError optional OPTIONAL an error object: if available, its message and error-stack will be print to the output -
d(className, funcName, msg)
-
Alias for
debug.Name Type Description classNameString optional OPTIONAL the name of the class/object from which the logging is invoked from funcNameString optional OPTIONAL the name of the function (within the class) from which the logging is invoked from msgString the log message -
debug(className, funcName, msg)
-
Print a debug log message, if at least
debug(1) log-level is set.Name Type Description classNameString optional OPTIONAL the name of the class/object from which the logging is invoked from funcNameString optional OPTIONAL the name of the function (within the class) from which the logging is invoked from msgString the log message -
e(className, funcName, msg, error)
-
Alias for
error.Name Type Description classNameString optional OPTIONAL the name of the class/object from which the logging is invoked from funcNameString optional OPTIONAL the name of the function (within the class) from which the logging is invoked from msgString the log message errorError optional OPTIONAL an error object: if available, its message and error-stack will be print to the output -
error(className, funcName, msg, error)
-
Print an error log message, if at least
error(4) log-level is set.Name Type Description classNameString optional OPTIONAL the name of the class/object from which the logging is invoked from funcNameString optional OPTIONAL the name of the function (within the class) from which the logging is invoked from msgString the log message errorError optional OPTIONAL an error object: if available, its message and error-stack will be print to the output -
getLevel(){Number}
-
Get the current log-level: if a specific log-level for this Logger instance is set, this value is returned. Otherwise, the default log-level as returned by
mmir.Logging#getDefaultLogLevelis used. Log-levels:- 0: verbose
- 1: debug
- 2: info
- 3: warn
- 4: error
- 5: critical
- 6: disabled
- See:
Returns:
Type Description Number the logging level -
i(className, funcName, msg)
-
Alias for
info.Name Type Description classNameString optional OPTIONAL the name of the class/object from which the logging is invoked from funcNameString optional OPTIONAL the name of the function (within the class) from which the logging is invoked from msgString the log message -
info(className, funcName, msg)
-
Print an information log message, if at least
info(2) log-level is set.Name Type Description classNameString optional OPTIONAL the name of the class/object from which the logging is invoked from funcNameString optional OPTIONAL the name of the function (within the class) from which the logging is invoked from msgString the log message -
isc(){Boolean}
-
Alias for
isCritical.- See:
Returns:
Type Description Boolean trueif at least log-levelcritical(5) -
isCritical(){Boolean}
-
Check if the current log-level is at least
critical.- See:
Returns:
Type Description Boolean trueif at least log-levelcritical(5) -
isd(){Boolean}
-
Alias for
isDebug.- See:
Returns:
Type Description Boolean trueif at least log-leveldebug(1) -
isDebug(){Boolean}
-
Check if the current log-level is at least
debug.- See:
Returns:
Type Description Boolean trueif at least log-leveldebug(1) -
isDisabled(){Boolean}
-
Check if the current log-level is at least
disabled.- See:
Returns:
Type Description Boolean trueif at least log-leveldisable(6) -
ise(){Boolean}
-
Alias for
isError.- See:
Returns:
Type Description Boolean trueif at least log-levelerror(4) -
isError(){Boolean}
-
Check if the current log-level is at least
error.- See:
Returns:
Type Description Boolean trueif at least log-levelerror(4) -
isi(){Boolean}
-
Alias for
isInfo.- See:
Returns:
Type Description Boolean trueif at least log-levelinfo(2) -
isInfo(){Boolean}
-
Check if the current log-level is at least
info.- See:
Returns:
Type Description Boolean trueif at least log-levelinfo(2) -
isv(){Boolean}
-
Alias for
isVerbose.- See:
Returns:
Type Description Boolean trueif at least log-levelverbose(0) -
isVerbose(){Boolean}
-
Check if the current log-level is at least
verbose.- See:
Returns:
Type Description Boolean trueif at least log-levelverbose(0) -
isw(){Boolean}
-
Alias for
isWarn.- See:
Returns:
Type Description Boolean trueif at least log-levelwarn(3) -
isWarn(){Boolean}
-
Check if the current log-level is at least
warn.- See:
Returns:
Type Description Boolean trueif at least log-levelwarn(3) -
l(className, funcName, msg, error)
-
Alias for
log.Name Type Description classNameString optional OPTIONAL the name of the class/object from which the logging is invoked from funcNameString optional OPTIONAL the name of the function (within the class) from which the logging is invoked from msgString the log message errorError optional OPTIONAL an error object: if available, its message and error-stack will be print to the output -
log(className, funcName, msg, error)
-
Print a log message, if at least
debuglog-level is set.Name Type Description classNameString optional OPTIONAL the name of the class/object from which the logging is invoked from funcNameString optional OPTIONAL the name of the function (within the class) from which the logging is invoked from msgString the log message errorError optional OPTIONAL an error object: if available, its message and error-stack will be print to the output -
setLevel(loggingLevel)
-
Set the logging level.
Name Type Description loggingLevelString | Number if {Number} the logging level as a number if {String} the logging level as a string (see getLevel)- See:
-
v(className, funcName, msg)
-
Alias for
verbose.Name Type Description classNameString optional OPTIONAL the name of the class/object from which the logging is invoked from funcNameString optional OPTIONAL the name of the function (within the class) from which the logging is invoked from msgString the log message -
verbose(className, funcName, msg)
-
Print a verbose log message, if at least
verbose(0) log-level is set.Name Type Description classNameString optional OPTIONAL the name of the class/object from which the logging is invoked from funcNameString optional OPTIONAL the name of the function (within the class) from which the logging is invoked from msgString the log message -
w(className, funcName, msg)
-
Alias for
warn.Name Type Description classNameString optional OPTIONAL the name of the class/object from which the logging is invoked from funcNameString optional OPTIONAL the name of the function (within the class) from which the logging is invoked from msgString the log message -
warn(className, funcName, msg)
-
Print a warning log message, if at least
warn(3) log-level is set.Name Type Description classNameString optional OPTIONAL the name of the class/object from which the logging is invoked from funcNameString optional OPTIONAL the name of the function (within the class) from which the logging is invoked from msgString the log message