Log4jsLogger
Extends:
Static Method Summary
| Static Public Methods | ||
| public static |
addAppender(objectPattern: {"type": *, "layout": *, "config": *, "category": *}) |
|
| public static |
getCoreLogger(options: *): * |
|
| public static |
getLogger(options: Object): Log4jsLogger |
|
| public static |
initCore(): * |
|
| public static |
logMiddleware(options: Object): Function |
|
| public static |
replaceAppender(appenders: ...*) |
|
Constructor Summary
| Public Constructor | ||
| public |
constructor(options: Object): Log4jsLogger |
|
Static Public Methods
public static addAppender(objectPattern: {"type": *, "layout": *, "config": *, "category": *}) source
Params:
| Name | Type | Attribute | Description |
| objectPattern | {"type": *, "layout": *, "config": *, "category": *} |
|
public static getCoreLogger(options: *): * source
Params:
| Name | Type | Attribute | Description |
| options | * |
Return:
| * |
public static getLogger(options: Object): Log4jsLogger source
Params:
| Name | Type | Attribute | Description |
| options | Object |
|
'app', level: 'info', replaceConsole: false}] - Options to initialize logger instance. |
| options.category | string |
|
Category of logger. |
| options.level | string |
|
Level to log. |
| options.replaceConsole | boolean |
|
Flag to switch replaceConsole options. |
public static logMiddleware(options: Object): Function source
Params:
| Name | Type | Attribute | Description |
| options | Object |
|
Options to setup logMiddleware(). |
| options.category | string |
|
Category name of request logger. |
| options.category | string |
|
Level to log. |
| options.format | string |
|
:url :status :content-length - :response-time ms] - Log format of request logger. |
public static replaceAppender(appenders: ...*) source
Params:
| Name | Type | Attribute | Description |
| appenders | ...* |
Public Constructors
public constructor(options: Object): Log4jsLogger source
Override:
Logger#constructorParams:
| Name | Type | Attribute | Description |
| options | Object |
|
Options to initialize logger instance. |
| options.category | string |
|
Category of logger. |
| options.level | string |
|
Level to log. |
| options.replaceConsole | boolean |
|
Flag to switch replaceConsole options. |