Skip to content

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

@jpstotz

Description

@jpstotz

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
      }
    ]
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions