I'm writing a rest api with NodeJS and express and I'm using express-winston to log accesses and erros. But I want to separate de log daily. Like in this post
I'm trying to do so with winston.transports.DailyRotateFile. A piece of code below.
filename: path.join(__dirname, "log-access", "log_file.log")
I had to do this so it would work:
var winston = require('winston'), expressWinston = require('express-winston'); winston.transports.DailyRotateFile = require('winston-daily-rotate-file');
I already had the right package but it wouldn't work, until I wrote the lines above.