Filename not being followed - filename always has date appended
See original GitHub issueWhen I set the file name transport as follows (or without the datePattern option):
transport = new (winston.transports.DailyRotateFile)({
filename: "applicaton.log",
datePattern: '',
zippedArchive: true,
maxSize: '20m',
maxFiles: '14d'
});
It appends the current date and creates a file with the name “application.log.2021-03-24”. I need the name to be exactly as specified, without a date. The rolled file name isn’t a concern. How can I achieve this?
Thank you
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (2 by maintainers)
Top Results From Across the Web
Solved: Flow to automatically append date to filename in s...
In your implementation, when building the new file name; original file name is stored first, then you add a '_' symbol, then current...
Read more >Why is the date appended twice on filenames when using ...
Append the date to the file name again. 4. Successfully access the file (which has the weird file name now).
Read more >bash - Appending a current date from a variable to a filename
You also do not want to use & at the end of your statements; which causes the shell to not wait for the...
Read more >How To Append Current Date To Filename in Bash Shell
There should not be a whitespace between + and the format string on line 3. Change $(date + “%Y-%m-%d”) to $(date +”%Y-%m-%d”).
Read more >How to Save a File Name With the Date
Rename the file including the date. Use dashes to separate portions of the name: the Windows operating system excludes certain characters from file...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I did the following, and it worked for me.
`
` The result was in logs directory: error.2021-09-22.log* error.log -> error.2021-09-22.log*
@mattberther Does symlinkName option works correctly even if dirname option is added?
I use next options with winstonDailyRotateFile and as a result it creates winston.log.2021-05-07 file instead of info.log that I expect?