Skip to content

Commit

Permalink
feat(config): add logging transport configuration option
Browse files Browse the repository at this point in the history
  • Loading branch information
acburdine committed Mar 16, 2017
1 parent 20bc6a4 commit f827ea4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions lib/commands/config/advanced.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,14 @@ module.exports = [{
name: 'dbname',
description: 'Database name',
configPath: 'database.connection.database'
}, {
name: 'log',
description: 'Transport to send Ghost log output to',
configPath: 'logging.transports',
filter: (value, transports) => {
transports.push(value);
return transports;
},
defaultValue: [], // used for commander.js config
default: ['file', 'stdout'] // used for config command handling
}];
2 changes: 1 addition & 1 deletion lib/commands/config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function handleAdvancedOptions(config, options) {
let value = options[option.name];
let key = option.configPath || option.name;

if (!value) {
if (!value || !value.length) {
if (!option.default) {
return Promise.resolve();
}
Expand Down

0 comments on commit f827ea4

Please sign in to comment.