lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Fri, Jul 8, 2011 at 08:35, Dave Collins
<Dave.Collins@mercatustechnologies.com> wrote:
> My app logs user activity. I'm thinking about ways to manage the log file(s).
>
> Simplest is to just fill up user_activity.log infinitely. But it could grow pretty large and I'd have to make a note to tell someone to manually delete it once in a while.
>
> My next idea is to log each user session in a new log file with an incremented name. That way *number* of files climbs, rather than *size* of one file.
>
> I'm interested in ideas about how to handle this (are there other philosophies for log management?) as well as routines to actually do it (each subsequent log file would have to increment its filename: 002,003, etc. so it'll need to know what the next number should be. How?).
>
>
>
> Dave Collins
> Front-End Engineer
> Mercatus Technologies Inc.
> 60 Adelaide Street East, Suite 700
> Toronto ON M5C 3E4
> T  416 603 3406 x 298
> F  416 603 1790
>
> dave.collins@mercatustechnologies.com
> www.mercatustechnologies.com
>
>

Is there a reason you need to reinvent log rotation? Every Unix-like
system out there has pretty advanced logging and rotation capabilities
already.

-- 
Sent from my toaster.