Logger
Class for configuring logging.
Static Method Summary
Static Private Methods | ||
private static |
_checkEmptyMessage(args: Object): Object Check if the message is empty and replace it with the meta. |
|
private static |
_consoleFormatter(args: Object): String Formatter function which formats the output to the console. |
|
private static |
Function to create a global logger object based on the properties of the Logger class. |
|
private static |
_fileFormatter(args: Object): String Formatter function which formate the output to the log file. |
|
private static |
_getLevelColor(level: String): String Get the color of the output based on the log level. |
Constructor Summary
Public Constructor | ||
public |
constructor(verbose: Boolean, debug: Boolean) Create a logger object. |
Static Private Methods
private static _checkEmptyMessage(args: Object): Object source
Check if the message is empty and replace it with the meta.
Params:
Name | Type | Attribute | Description |
args | Object | Arguments passed by Winston. |
private static _consoleFormatter(args: Object): String source
Formatter function which formats the output to the console.
Params:
Name | Type | Attribute | Description |
args | Object | Arguments passed by Winston. |
private static _createLogger() source
Function to create a global logger object based on the properties of the Logger class.