News for hackers. Stuff that matters.
Re:7 Good Rules to Log Exceptions by DenisM on Tuesday December 16, 2008 @01:17PM (#399778)
Why not rotate log files based on size?
Re:7 Good Rules to Log Exceptions by cconstantine on Tuesday December 16, 2008 @02:52PM (#399927)
A better idea may be to not log to file. If you were to log to a database you could record things like date/time, session_id, service_name, module_name, and a generic message and do clever SELECTs on your database of events/messages and it would be easier to answer questions like 'Is this exception clustered with time?' or 'is module X ever called in a session that results in an error between noon and 1pm?'

Cleaning old messages is potentially easier as you can remove lower priority messages first, or simply delete any message older than X.

Of course, if you're logging to another remote service (like a DB server), how do you record low level events in communicating with that service, or how do you record events when the db server is down?

Re:7 Good Rules to Log Exceptions by joestrickler on Wednesday December 17, 2008 @01:02AM (#400619)
Log critical/connectivity errors to a local disk.
Re:7 Good Rules to Log Exceptions by cconstantine on Tuesday December 16, 2008 @02:36PM (#399905)
No real reason except that it works the way it does. It would take time to change it, and there is more pressing work to be done. That, and I don't work for the company that had/has this problem anymore.