Skip to content

Commit

Permalink
Update winston to 3.x to get rid of the circular dependency warning
Browse files Browse the repository at this point in the history
This warning came from winston 0.8.x:

    Warning: Accessing non-existent property 'padLevels' of module
    exports inside circular dependency

See foreversd/forever#1077
  • Loading branch information
Terseus committed Apr 7, 2021
1 parent 541a824 commit a87d5da
Show file tree
Hide file tree
Showing 3 changed files with 479 additions and 80 deletions.
13 changes: 4 additions & 9 deletions lib/cliff.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,15 @@ cliff.__defineGetter__('logger', function () {

cliff.__defineSetter__('logger', function (val) {
logger = val;

//
// Setup winston to use the `cli` formats
//
if (logger.cli) {
logger.cli();
}
});

//
// Set the default logger for cliff.
//
cliff.logger = new winston.Logger({
transports: [new winston.transports.Console()]
cliff.logger = new winston.createLogger({
transports: [new winston.transports.Console({
format: winston.format.cli(),
})]
});

//
Expand Down
Loading

0 comments on commit a87d5da

Please sign in to comment.