Skip to content
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 3 compatibility - file creation #1494

Closed
1 of 2 tasks
chrismueller opened this issue Oct 4, 2018 · 10 comments
Closed
1 of 2 tasks

Winston 3 compatibility - file creation #1494

chrismueller opened this issue Oct 4, 2018 · 10 comments
Labels
Feature Request Request for new functionality to support use cases not already covered Good First Issue Good issue for new contributors

Comments

@chrismueller
Copy link

Please tell us about your environment:

winston version?

  • winston@2
  • winston@3

What is the problem?

With winston@2 I'm running two file transports. One logging all events and one logging only errors and exceptions. winston@2 is creating the log files when the first log entry is written. winston@3 is creating the log files at initialization even if no log entry is written. It would be nice to have an option to disable the precreation of the log files.

The reason behind is that I'm monitoring my application with checking the existence of the "error" log file.
And now with winston@3 this file is allways created when the application is started,

What's the feature?

Option to disable the precreation of log files

Is this feature similar to an existing feature in another tool?

Like the behave in winston@2

@DABH
Copy link
Contributor

DABH commented Oct 9, 2018

Sure, seems reasonable! I'd be happy to review a PR for this if you're interested/have time, otherwise this is probably just a few-line change so I could look at implementing it in the near future.

@DABH DABH added Feature Request Request for new functionality to support use cases not already covered Good First Issue Good issue for new contributors labels Oct 9, 2018
@kwiatkk1
Copy link
Contributor

Hi! As you marked this as "good first issue", I've tried to tackle this in #1507.

@Pulkit0729
Copy link
Contributor

Hi, I would like to work on this issue. I have read all the previous comments and looked at the existing PR

@DABH
Copy link
Contributor

DABH commented Jun 23, 2023

Feel free to open a new PR and use code from that old PR — if you address all my comments then we could merge

@Pulkit0729
Copy link
Contributor

@DABH In comment, are you refrencing to DailyRotateFile?

@DABH
Copy link
Contributor

DABH commented Jun 23, 2023

No, the File transport itself supports rotation, that is what I was referring to -- although winsto-daily-rotate-file is very nice :)

@Pulkit0729
Copy link
Contributor

Pulkit0729 commented Jun 23, 2023

Hey, why is there no documentation for using ratationFormat option in File transport? There is a comment in code saying roation format was broken when combined with max files

@DABH
Copy link
Contributor

DABH commented Jun 23, 2023

I don't know -- that sounds like a problem that arose when rewriting winston 2 to winston 3. It sounds like some new tests should be written, and/or some documentation added :) Unfortunately I haven't looked at the file transport code in a long time -- sorry I can't give more specific advice :(

@Pulkit0729
Copy link
Contributor

#2317
I have crerated a pull request for the issue.
Please review it.

@DABH
Copy link
Contributor

DABH commented Jul 10, 2023

Marking this issue as closed via #2317; will go out in next release

@DABH DABH closed this as completed Jul 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request Request for new functionality to support use cases not already covered Good First Issue Good issue for new contributors
Projects
None yet
Development

No branches or pull requests

4 participants