mirror of
https://github.com/aurora-dot/pastel.codes.git
synced 2025-09-03 03:56:51 +01:00
Add linting, formatting and pre-commit (#53)
* Add dev-dependancies * Security update npm packages * Force audit fix * Add linting, formatting and precommit * Format files
This commit is contained in:
@@ -2,29 +2,29 @@ var winston = require('winston');
|
||||
var appRoot = require('app-root-path');
|
||||
|
||||
var logger = new winston.createLogger({
|
||||
transports: [
|
||||
new winston.transports.File({
|
||||
level: 'info',
|
||||
filename: `${appRoot}/logs/app.log`,
|
||||
handleExceptions: true,
|
||||
json: true,
|
||||
maxsize: 5242880, //5MB
|
||||
maxFiles: 5,
|
||||
colorize: false
|
||||
}),
|
||||
new winston.transports.Console({
|
||||
level: 'debug',
|
||||
handleExceptions: true,
|
||||
json: false,
|
||||
colorize: true
|
||||
})
|
||||
],
|
||||
exitOnError: false
|
||||
transports: [
|
||||
new winston.transports.File({
|
||||
level: 'info',
|
||||
filename: `${appRoot}/logs/app.log`,
|
||||
handleExceptions: true,
|
||||
json: true,
|
||||
maxsize: 5242880, //5MB
|
||||
maxFiles: 5,
|
||||
colorize: false,
|
||||
}),
|
||||
new winston.transports.Console({
|
||||
level: 'debug',
|
||||
handleExceptions: true,
|
||||
json: false,
|
||||
colorize: true,
|
||||
}),
|
||||
],
|
||||
exitOnError: false,
|
||||
});
|
||||
|
||||
logger.stream = {
|
||||
write: function(message, encoding){
|
||||
logger.info(message);
|
||||
}
|
||||
write: function (message, _encoding) {
|
||||
logger.info(message);
|
||||
},
|
||||
};
|
||||
module.exports = logger
|
||||
module.exports = logger;
|
||||
|
Reference in New Issue
Block a user