May have to rethink somewhat this code as I forgot to take account of what happens when only some of the rotations are present eg there are 10 rotations specified but the system has only written a lessor number out. Discovered when I tried the change under AIX.
Here is a revised version which seems to show the right behaviour (at least on the Unix system at work). I will observe the behaviour over the next few days to check that it really does roll over correctly. (See attached file: RevolvingFileStrategy.java) ---------------------- Forwarded by David Gray/CO/HIC on 25/03/2002 14:18 --------------------------- David Gray 25/03/2002 09:16 To: "'Avalon Developers List'" <[EMAIL PROTECTED]> cc: Subject: Logkit: RevolvingFileStrategy - suggested changes. I got sick-and-tired of having this class restart the current revolving suffix every time I restarted the program so I whiped up some code to implement one of the TODOs - namely scanning the file system looking for the oldest file number. (Actual took about 5 hours so "whiped" is not the correct word). I have tested this against my NT 2000 machine at home but not against a Unix/Aix/Linux box although the code should be portable ;->. Would appreciate someone looking at this (are you there Pete) and seeing whether it is good enough to get included into Logkit's next release. There are some tricks, it needs to treat filenames without paths a little differently to those with paths. And I did not assume the files came back in any particular order. In the meantime I intend to use it in my project as an industrial strength test. **************************************************************** NOTICE - This message is intended only for the use of the addressee named above and may contain privileged and confidential information. If you are not the intended recipient of this message you are hereby notified that you must not disseminate, copy or take any action based upon it. If you received this message in error please notify HIC immediately. Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of HIC. ****************************************************************
RevolvingFileStrategy.java
Description: Binary data
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>