logging transports doesn't convert configuration input to an array
See original GitHub issueIssue Summary
https://github.com/TryGhost/Ghost/blob/master/core/server/config/env/config.production.json#L22 If I specify a single logging transport, this throws an error,
this.transports.forEach((transport) => {
^
TypeError: this.transports.forEach is not a function
at new GhostLogger (/home/esatterwhite/dev/js/ghost-blog/versions/1.7.1/node_modules/ghost-ignition/lib/logging/GhostLogger.js:54:25)
at createNewInstance (/home/esatterwhite/dev/js/ghost-blog/versions/1.7.1/node_modules/ghost-ignition/lib/logging/index.js:10:19)
at Object.<anonymous> (/home/esatterwhite/dev/js/ghost-blog/versions/1.7.1/core/server/logging.js:4:18)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/home/esatterwhite/dev/js/ghost-blog/versions/1.7.1/core/server/index.js:20:15)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
A summary of the issue and the browser/OS environment in which it occurs.
Steps to Reproduce
node current/index.js --logging:level=error --logging:transports=file
Any other info e.g. Why do you consider this to be a bug? What did you expect to happen instead?
Technical details:
- Ghost Version: 1.7
- Node Version: 6.11
- Browser/OS: N/A
- Database: N/A
Issue Analytics
- State:
- Created 6 years ago
- Comments:14 (7 by maintainers)
Top Results From Across the Web
How to log JavaScript objects and arrays in winston as ...
Use the built-in Node.js function util.format to convert your objects to strings in the same way that console.log does.
Read more >Complete Winston Logger Guide With Hands-on Examples
Winston creates custom logger instances which can be configured to ... To define them, you can add a transports array (which can contain...
Read more >Extract array | Filebeat Reference [8.5] - Elastic
The following example will populate source.ip with the first element of the my_array field, destination.ip with the second element, and network.transport with ...
Read more >Log4j 2 Layouts - Apache Logging Services
In Log4j 2 Layouts return a byte array. This allows the result of the Layout to be useful in many more types of...
Read more >Logging - Zephyr Project Documentation
It cannot be used to lower module logging levels that were ... to the transport are not performed by default when logging API...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@BretFisher nconf has merged the support for array parsing.
We have to add a flag to tell
nconf
to parse arrays/objects usingparseValues
.I’ll re-open this issue now. PR is welcome 👍