Skip to content

Commit

Permalink
Update logger and add pictures
Browse files Browse the repository at this point in the history
  • Loading branch information
Remco authored and Remco committed Feb 22, 2016
1 parent ca47255 commit d0fa18a
Show file tree
Hide file tree
Showing 13 changed files with 16 additions and 37 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ npm-debug.log*
# UGC
config.json
music
images
runtime/databases
runtime/alias.json
sound.mp4
Expand Down
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.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "WildBeast",
"version": "2.0.0-gamma.4",
"version": "2.0.0-gamma.5",
"description": "A Discord bot",
"readme": "README.md",
"maintainers": [
Expand All @@ -25,6 +25,7 @@
"request": "^2.61.0",
"unirest": "*",
"winston": "^2.1.1",
"winston-daily-rotate-file": "^1.0.1",
"xml2js": "*",
"youtube-node": "1.3.0",
"ytdl-core": "^0.7.10"
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 d0fa18a

Please sign in to comment.