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

Not deleting old log files #372

Open
splatteredbits opened this issue May 15, 2023 · 0 comments
Open

Not deleting old log files #372

splatteredbits opened this issue May 15, 2023 · 0 comments

Comments

@splatteredbits
Copy link

splatteredbits commented May 15, 2023

We're using the Winston daily logger like so:

	const transport = new (winston.transports.DailyRotateFile)({
		datePattern: 'YYYYMMDD-HH0000000',
		filename: process.env.COMPUTERNAME + '_www_H%DATE%.log',
		dirname: logFolder,
		maxFiles: '14d',
		utc: true
	});

	const webLogger = winston.createLogger({
		transports: [
			transport
		]
	});

However, it's not deleting old log files (our server name is [A-Z]{6}\d\d[A-Z]-[A-Z]{3}-\d\d, if that makes a difference):

image

I would expect that all old log files that match the datePattern and filename would be deleted.

Environment:

  • Windows Server 2012R2
  • Node.js 18.15.0
  • winston 3.8.2
  • winston-daily-rotate-file 4.7.1
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

1 participant