Moved abspath option checking into file appender, log4js options now passed to appenders
This commit is contained in:
@@ -50,11 +50,16 @@ function fileAppender (file, layout, logSize, numBackups) {
|
||||
};
|
||||
}
|
||||
|
||||
function configure(config) {
|
||||
function configure(config, options) {
|
||||
var layout;
|
||||
if (config.layout) {
|
||||
layout = layouts.layout(config.layout.type, config.layout);
|
||||
}
|
||||
|
||||
if (options && options.cwd && !config.absolute) {
|
||||
config.filename = path.join(options.cwd, config.filename);
|
||||
}
|
||||
|
||||
return fileAppender(config.filename, layout, config.maxLogSize, config.backups);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user