Check environment variable LOG4JS_CONFIG for configuration file location.

This commit is contained in:
Daniel Bell
2012-10-16 08:36:26 +11:00
parent 2bfad6362a
commit ad63b801f7
3 changed files with 51 additions and 6 deletions

View File

@@ -240,8 +240,9 @@ function initReloadConfiguration(filename, options) {
function configure(configurationFileOrObject, options) {
var config = configurationFileOrObject;
config = config || process.env.LOG4JS_CONFIG;
options = options || {};
if (config === undefined || config === null || typeof(config) === 'string') {
if (options.reloadSecs) {
initReloadConfiguration(config, options);