Skip to content

Commit

Permalink
Merge pull request #23 from SteamingMutt/greenkeeper-update-all
Browse files Browse the repository at this point in the history
Update logger to support Winston 2.0 and readd images from 1.3.8
  • Loading branch information
Remco authored and Remco committed Feb 22, 2016
2 parents 0b495d3 + b580192 commit 0247da6
Show file tree
Hide file tree
Showing 12 changed files with 17 additions and 37 deletions.
Binary file added images/clubpenguin.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/dankocmeme.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/happening.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/highqualitybait.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/johncena.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/kappa.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/newfeaturespls.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/subparmeme.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/topkek.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/trollingtheinterwebs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@
"pmx": "^0.6.0",
"request": "^2.61.0",
"unirest": "*",
"winston": "^1.1.1",
"winston": "^2.1.1",
"winston-daily-rotate-file": "^1.0.1",
"xml2js": "*",
"youtube-node": "1.2.x",
"youtube-node": "1.3.0",
"ytdl-core": "^0.7.10"
},
"main": "DougBot.js"
Expand Down
49 changes: 14 additions & 35 deletions runtime/logger.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,48 +6,30 @@ Winston.emitErrs = true;

exports.ChatLog = new Winston.Logger({
transports: [
new Winston.transports.DailyRotateFile({
handleExceptions: false,
name: 'file:chat',
filename: __dirname + '/../logs/chat',
datePattern: '-dd-MM-yyyy.log',
formatter: function(args) {
return args.message;
},
new (require('winston-daily-rotate-file'))({
level: 'info',
json: false
filename: __dirname + '/../logs/chatlog',
datePattern: '-dd-MM-yyyy.log'
})
]
});

exports.DebugModeLog = new Winston.Logger({
transports: [
new Winston.transports.DailyRotateFile({
handleExceptions: false,
name: 'file:debugmodelog',
filename: __dirname + '/../logs/debugmodelog',
datePattern: '-dd-MM-yyyy.log',
formatter: function(args) {
return args.message;
},
new (require('winston-daily-rotate-file'))({
level: 'debug',
json: false
filename: __dirname + '/../logs/debugmodelog',
datePattern: '-dd-MM-yyyy.log'
})
]
});

exports.VerboseModeLog = new Winston.Logger({
transports: [
new Winston.transports.DailyRotateFile({
handleExceptions: false,
name: 'file:verbosemodelog',
filename: __dirname + '/../logs/verbosemodelog',
new (require('winston-daily-rotate-file'))({
level: 'info',
datePattern: '-dd-MM-yyyy.log',
formatter: function(args) {
return args.message;
},
level: 'debug',
json: false
filename: __dirname + '/../logs/verbosemodelog'
})
]
});
Expand All @@ -63,33 +45,30 @@ exports.Logger = new Winston.Logger({
error: 'red'
},
transports: [
new Winston.transports.DailyRotateFile({
new (require('winston-daily-rotate-file'))({
humanReadableUnhandledException: true,
handleExceptions: true,
name: 'file:exceptions',
filename: __dirname + '/../logs/exceptions',
datePattern: '-dd-MM-yyyy.log',
level: 'exception',
json: false
}),
new Winston.transports.DailyRotateFile({
handleExceptions: false,
new (require('winston-daily-rotate-file'))({
name: 'file:error',
filename: __dirname + '/../logs/errors',
datePattern: '-dd-MM-yyyy.log',
level: 'error',
json: false
}),
new Winston.transports.DailyRotateFile({
handleExceptions: false,
new (require('winston-daily-rotate-file'))({
name: 'file:console',
filename: __dirname + '/../logs/console',
datePattern: '-dd-MM-yyyy.log',
level: 'debug',
json: false
}),
new Winston.transports.Console({
handleExceptions: true,
new (Winston.transports.Console)({
humanReadableUnhandledException: true,
level: 'verbose',
colorize: true,
json: false
Expand Down

0 comments on commit 0247da6

Please sign in to comment.