Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

configuration file log4js.json does not contain a valid configuration #7

Open
jpstotz opened this issue Feb 24, 2020 · 1 comment
Open

Comments

@jpstotz
Copy link

jpstotz commented Feb 24, 2020

When using the sample configuration file config/log4js.json log4js is unable to load this configuration:

 "appenderList.forEach is not a function" (TypeError: appenderList.forEach is not a function
    at configureAppenders (node_modules\log4js\lib\log4js.js:248:18)
    at configureOnceOff (node_modules\log4js\lib\log4js.js:308:7)
    at Object.configure (node_modules\log4js\lib\log4js.js:371:3)

A valid configuration file looks more like this:

{
    "appenders": [
      {
        "type": "dateFile",
        "filename": "log/access.log",
        "pattern": "-yyyy-MM-dd",
        "category": "http"
      },
      {
        "type": "file",
        "filename": "log/app.log",
        "maxLogSize": 10485760,
        "numBackups": 3
      }
    ]
  }

@golimarrrr
Copy link

Also in bin/www there is this line that refers to a logger that doesn't exist in the config file:

var log = log4js.getLogger("startup");

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants