powered by Jive Software

Audit logging overwriting the same file over and over

Been trying to find a report of this, and I can’t find one, but maybe it has been discussed/known/worked around already.

I’m logging packets to /logs and I get files like jive.audit-20080402-000.log, 001.log, etc. Except that often it’ll get stuck on a number and continually overwrite the same file, meaning I’m losing precious data. Has anyone seen this before? If so, what’s causing it, and how do you work around it?


Reason #782364 to love Java:


listFiles() - There is no guarantee that the name strings in the resulting array will appear in any specific order; they are not, in particular, guaranteed to appear in alphabetical order.

The AuditImpl.java file in createAuditFile() method uses baseFolder.listFiles() then cycles through them to generate a new index number. This code just lost me about 15 hours worth of log data which I’ll never get back now.

May I suggest that the sequential number is just done away with and a timestamp is used? Half of the file name is already a timestamp - just at the day level. Just make the whole thing an timestamp - YYYYMMDDHHIISS and then you’ll do away with the listFile() mess, sequence counting, lost data, and the arbitrary-seeming “999” limit.

Not sure where/how to deal with this request, but someone please have a look at this. I’m having to do some kludgy cron jobs to copy files out of the dir so they don’t get overwritten every minute.


JM-1212 is a well-known problem

Indicating it’s a ‘known problem’ but not listing what the symptoms are makes it hard to track down.

What’s even worse about this is that it’s there are at least 2 work arounds, both of which are pretty basic, and both of which make the code easier to understand. Why neither of these fixes has been applied since JM-1212 was logged in DECEMBER - 4 months ago now - would make me seriously question the ‘enterpriseness’ of this organization and software. No one can have ever tested this under any real world scenarios for more than a day, else this would have been a reason to disable the ‘logging’ functionality. Why have a ‘features’ that’s known to not work, and not just ‘not work’, but lose data?

Thanks all the same for pointing it out. It just really makes me question ever recommending this software to anyone.