* Get a logger instance. * @static * @param {string} [category=default] * @return {Logger} instance of logger for the category
(category)
| 154 | * @return {Logger} instance of logger for the category |
| 155 | */ |
| 156 | function getLogger(category) { |
| 157 | if (!enabled) { |
| 158 | configure( |
| 159 | process.env.LOG4JS_CONFIG || { |
| 160 | appenders: { out: { type: 'stdout' } }, |
| 161 | categories: { default: { appenders: ['out'], level: 'OFF' } }, |
| 162 | } |
| 163 | ); |
| 164 | } |
| 165 | return new Logger(category || 'default'); |
| 166 | } |
| 167 | |
| 168 | /** |
| 169 | * @name log4js |