Page 1 of 1

Logs, logs everywhere, but which ones to keep? :)

Posted: Sat Dec 05, 2009 10:17 pm
by AlanG
I'm working on a audit logging system to tie into another system and am just wondering how detailed should I be with what I record?

I am using a MySQL archive storage engine and have an AuditLog object (with various derived classes).

So, should I log application wide actions, or just actions relevant to the business logic? As in ignore MySQL connections as the MySQL server is worrying about that?

I realise the answer to this really does depend on the context of the system; as there is some financial information being stored, logging is in paranoid mode there. :) Also, how many logs should be made per day before you start to rethink what's being stored? 100 logs a day is nothing, but 1000000 could cause some concern?

Maybe it doesn't matter at all... :S

Re: Logs, logs everywhere, but which ones to keep? :)

Posted: Sun Dec 06, 2009 5:30 pm
by josh
Things like mysql errors should throw exceptions, uncaught exceptions should get logged to a special exception.log and/or emailed to the dev