-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
winston is not creating the log file again if file is deleted manually or by other app #705
Comments
Same here |
Same here, any resolution? |
Workaround: Currently im watching the files in every 45 sec. If not present
|
No log files are being created, makes me sad |
Same here |
Two years later and this ticket is still open?!! Am I missing something here? |
Same here |
Same here. And I found log4php has the same problem when PHP running in daemon mode(Swoole etc.). I just wanna know why. |
Same here :( |
+1, almost 4 years on and still open. Does make me worry about future support of winston... |
winston is getting slower and slower day by day. They don't fixes basic problems. So why do I care? |
@somnathpanja are you working on your logger ? i would like to contribute if you need any help ? |
Same =( |
+1 this PR winstonjs/winston-daily-rotate-file#323 which will recreate the log file on accidental deletion |
same here |
@gsd447 what versions are you using? Can you share more detail? The PR which was supposed to fix this was merged a while ago. |
It seems like this issue is still not fixed (I'm running latest version of Winston). And I've tried DailyRotateFile as mentioned in this thread(winstonjs/winston-daily-rotate-file#376), but it also doesn't work, unless the documentation is lacking some more details on how to set it up. |
Below, how I create the logger instance. Initially it's logging properly but if my logrotate app deletes the log file then Winston is no longer creating the file again. It just silently ignoring and not logging anything.
var logger = new (winston.Logger)({
level: name,
levels: levels,
transports: [
new winston.transports.File({
filename: path.normalize(filePath),
options: { flags: 'a' },
json: false,
timestamp: function () {
return (new Date()).toUTCString();
},
formatter: formatterFunc
})
]
});
The text was updated successfully, but these errors were encountered: