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

multiFile with timeout param, randomly delelte log files #1354

Open
tjpgt opened this issue Dec 28, 2022 · 2 comments
Open

multiFile with timeout param, randomly delelte log files #1354

tjpgt opened this issue Dec 28, 2022 · 2 comments
Labels
bug Something isn't working
Milestone

Comments

@tjpgt
Copy link

tjpgt commented Dec 28, 2022

from: #1352

code:

const log4js = require('log4js');

const extension = '.log';
log4js.configure({
  appenders: {
    multi: {
      type: 'multiFile', base: '.', property: 'categoryName', extension,
      maxLogSize: 60, timeout: 1000,
      layout: { type: 'messagePassThrough' }
    }
  },
  categories: {
    default: { appenders: ['multi'], level: 'debug' }
  }
});

const logger=log4js.getLogger('test');
setInterval(()=>{
    logger.log(new Date())
},1000)

log4js version: 6.7.1

Using my code above, after a while, I expect it should generate 5 or 6 log file. For example, test.log, test.log.1, test.log.2 ... test.log.5. But what actually happens is, it randomly deletes the log file, only keeps the test.log, test.log.1(and maybe some other files).

like:

image

@lamweili lamweili added this to the 6.8.0 milestone Dec 28, 2022
@lamweili lamweili added the bug Something isn't working label Dec 28, 2022
@lamweili lamweili modified the milestones: 6.8.0, 6.8.1 Feb 20, 2023
@lamweili lamweili modified the milestones: 6.9.0, 6.9.1, 6.9.2 Mar 7, 2023
@Janaki4
Copy link

Janaki4 commented Mar 25, 2023

Hey , Is this issue still open ?

@tjpgt
Copy link
Author

tjpgt commented Mar 27, 2023

Hey , Is this issue still open ?

Yes, the problem still exists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants