csausdev/log4js-node — Issue #27: rolling file rename error
Author: cliffano
Created: 2011-10-18 01:04:22+00:00
State: open

Found this error:
[2011-10-18 02:55:04.590] [ERROR] console - Error: ENOENT, No such file or directory '/foo/bar/node1/logs/foobar.log.9'
at Object.renameSync (fs.js:320:18)
at rollThatLog (/foo/bar/node_modules/log4js/lib/appenders/file.js:40:24)
at StatWatcher. (/foo/bar/node_modules/log4js/lib/appenders/file.js:29:21)

The interesting thing is that the error occured on foobar.log.4, but it's complaining about foobar.log.9, which exists btw, so I'm not sure why it's complaining about 'No such file or directory'.

The files at /foo/bar/node1/logs/:
-rw-r--r-- 1 octocat octocat 0 Oct 18 02:55 foobar.log
-rw-r--r-- 1 octocat octocat 0 Oct 18 02:55 foobar.log.1
-rw-r--r-- 1 octocat octocat 0 Oct 9 09:18 foobar.log.10
-rw-r--r-- 1 octocat octocat 0 Oct 18 02:55 foobar.log.2
-rw-r--r-- 1 octocat octocat 104858178 Oct 18 02:55 foobar.log.4
-rw-r--r-- 1 octocat octocat 121278872 Oct 17 12:47 foobar.log.5
-rw-r--r-- 1 octocat octocat 104858259 Oct 14 18:39 foobar.log.6
-rw-r--r-- 1 octocat octocat 403161013 Oct 14 12:15 foobar.log.8
-rw-r--r-- 1 octocat octocat 109284476 Oct 11 16:59 foobar.log.9

log4js.json:
{
"appenders": [{
"type": "logLevelFilter",
"level": "DEBUG",
"appender": {
"type": "file",
"filename": "/foo/bar/node1/logs/foobar.log",
"maxLogSize": 104857600,
"backups": 10,
"pollInterval": 15
}
}]
}