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

%DATE% being appended to filename #235

Closed
sumeet-bansal opened this issue Aug 28, 2019 · 4 comments
Closed

%DATE% being appended to filename #235

sumeet-bansal opened this issue Aug 28, 2019 · 4 comments

Comments

@sumeet-bansal
Copy link

My current transport:

new WinstonDailyRotateFile({
    dirname: "./var/log",
    filename: "service.log",
    datePattern: "YYYY-MM-DD",
    zippedArchive: true,
    maxSize: "1g",
    maxFiles: "30d",
}),

This writes logs to ./var/log/service.log.%DATE%; how can I avoid this? Also, how can I specify a different directory for rotated logs?

@sumeet-bansal
Copy link
Author

@mattberther?

@mattberther
Copy link
Member

Your first question should be resolved with the following configuration:

filename: "service-%DATE%.log"

At this time, there is not a way to specify a different directory for rotated logs.

@sumeet-bansal
Copy link
Author

Is there any way to have the primary log be called just service.log?

@mattberther
Copy link
Member

Not at this time. You can track #23 for progress on that front.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants