Skip to content

Commit

Permalink
fix: fix error logging from submodules
Browse files Browse the repository at this point in the history
```
[winston] Attempt to write logs with no transports
```
  • Loading branch information
grv87 committed Aug 5, 2019
1 parent 561d5bf commit dc634b2
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ var _ = require('lodash');
var fs = Promise.promisifyAll(require('fs'));
var readdirp = require('readdirp');
var Ajv = require('ajv');
var winston = require('winston');
var logger = require('winston');

var Schema = require('./lib/schema');
var readSchemaFile = require('./lib/readSchemaFile');
Expand Down Expand Up @@ -56,14 +56,14 @@ var argv = require('optimist')
const docs = _.fromPairs(_.toPairs(argv).filter(([ key, value ]) => { return key.startsWith('link-'); }).map(([ key, value ]) => { return [ key.substr(5), value ];}));
const i18n = require('i18n');

const logger = winston.createLogger({
logger.configure({
level: 'info',
format: winston.format.combine(
winston.format.splat(),
winston.format.simple()
format: logger.format.combine(
logger.format.splat(),
logger.format.simple()
),
transports: [
new winston.transports.Console({})
new logger.transports.Console({})
]
});

Expand Down

0 comments on commit dc634b2

Please sign in to comment.