log4js-node / log4js-node/log4js-example
configuration file log4js.json does not contain a valid configuration
Open
Beginner friendly
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 141
- Forks
- 112
- PR merge metrics
- No merged PRs in 30d
Description
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
}
]
}
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Inspect config/log4js.json and compare it with the valid configuration example in the issue. Update the sample so log4js can load it without the reported TypeError, then verify that the example application accepts the configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 62/100