0

All,

We have been using log4j's RollingFileAppender for quite a while using a properties file, with no issues. Recently, we had a requirement for a rolling log that needed to not use a properties file, but to be programmatically configure. No problems getting that coded. Now, we are experiencing hangs in WinNTFileSystem.getBooleanAttributes when log4j attempts to roll the newly added log file. getBooleanAttributes is called as part of the call for File.exists.

I can't come up with a reason why this should be so. Has anyone experienced this? Have any suggestions? At this point, all I can think to do is to write my own roller.

Thanks, Todd

1 Answer 1

1

It appears that the index used for the maximum index to which the files can roll was too large. Since we didn't really want a limit, MAX_INTEGER was used. Now, the maximum index is computed based upon total disc size allowed and is much smaller than MAX_INTEGER.

1
  • My Java utility was hanging right after filling up the first file and create the second one - the MaxBackIndex was set to a ridiculously large amount (1,000,000) which was the root cause of all this. Setting this to a reasonable 300 did the trick. Jun 13, 2014 at 13:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.