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 Jan 29, 2022
1 parent 541a824 commit 51c7694
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 = winston.createLogger({
transports: [new winston.transports.Console({
format: winston.format.cli(),
})]
});

//
Expand Down
Loading

0 comments on commit 51c7694

Please sign in to comment.