-
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
Property "tailable: true" is not working as declared for winston File Transport #1450
Comments
This may have just been fixed via merging #1420. Any chance you could give this a try using master, and seeing whether this works for you now? Thanks! |
I can confirm that |
Sweet. We will be publishing a 3.x update to npm very soon! |
Hi everyone! I tested this fix and I have some results:
|
That would be great. If you figure out how to fix any errors in the code, that would be especially appreciated (feel free to open a PR!). Probably best to open a new issue if you find different errors in the code. Thanks again! |
Closing this one for now since we got v3.1.0 published! |
Environment:
winston@3
node -v
:v8.6.0
andv10.7.0
Problem:
I am using File winston transport in this way:
File 'log.out' is created in necessary directory, but after the maxsize reached, logging is stopped, it means no files created.
But in 'tailable' property description "If true, log files will be rolled based on maxsize and maxfiles, but in ascending order. The filename will always have the most recent log lines. The larger the appended number, the older the log file"
I think, problem is that code of creating new and renaming old log files is unreachable:
from
winston/lib/winston/transports/file.js
Line 600 in a32aa3c
till
winston/lib/winston/transports/file.js
Line 609 in a32aa3c
due to internal error in asyncSeries() function:
winston/lib/winston/transports/file.js
Line 615 in a32aa3c
winston/lib/winston/transports/file.js
Line 12 in a32aa3c
and this code is also unreachable:
winston/lib/winston/transports/file.js
Line 617 in a32aa3c
(only in case "maxFiles: 1", then tasks array is empty)
Similiar Github issues:
#589
winstonjs/winston-daily-rotate-file#23 ("still doesn't work with winston@2.4.1")
#1264
The text was updated successfully, but these errors were encountered: