This commit is contained in:
Esther 2020-06-22 22:53:27 +01:00
parent 76190ef7d8
commit 164a7246bd
No known key found for this signature in database
GPG Key ID: 162A307C5EBD40EA

View File

@ -1,10 +1,11 @@
var winston = require('winston'); var winston = require('winston');
var appRoot = require('app-root-path');
var logger = new winston.createLogger({ var logger = new winston.createLogger({
transports: [ transports: [
new winston.transports.File({ new winston.transports.File({
level: 'info', level: 'info',
filename: './logs/all-logs.log', filename: `${appRoot}/logs/app.log`,
handleExceptions: true, handleExceptions: true,
json: true, json: true,
maxsize: 5242880, //5MB maxsize: 5242880, //5MB