Does not recreate the log file when after it is initialized once.
There seems to be a problem when I tried to delete a log file generated after the start-up of my application. What happens is that when I delete the log file while the application is running, a new log file is not created.
inside my app.js
var log4js = require('log4js');
var JSON_CONFIG_PATH = __dirname + '/config/log4js-config.json';
log4js.configure(JSON_CONFIG_PATH);
log4js.getLogger('app');
while inside my log4js-config.json
{
"appenders": [
{
"type": "file",
"filename": "../logs/log_file.log",
"maxLogSize": 20480,
"backups": 3,
"category" : "server"
},
{
"type": "console"
}
],
"levels": {
"[all]": "INFO"
}
}
Yep, that sounds likely. I've never tested what happens in that scenario. Most likely log4js has a reference to a file handle that does not exist - I would have thought you'd get some errors when it tries to write to the file?
Apparently, no errors were displayed anywhere.
Closing this one as I'm not sure what the correct behaviour is here. Feel free to re-open if this scenario is important.