I’m not sure how to using env logging__transports since it is an array. This might need an extra transform when ghost starts up to interpret [“files”, “stdout”] or a csv, maybe?
It should be supported as per:
opened 06:46PM - 26 Aug 17 UTC
closed 07:06PM - 28 Oct 18 UTC
good first issue
server / core
### Issue Summary
https://github.com/TryGhost/Ghost/blob/master/core/server/con… fig/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
1.
```
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
1 Like
Oh, look at that. Already solved.
This worked just fine:
-e logging__level=info \
-e logging__transports='["stdout"]' \
2 Likes