[Seaside] Re: user/session activity logging in seaside -- logging
what each user is doing.. (was: activity logs - any ideas?)
yanni at rogers.com
Sun Mar 5 01:22:30 UTC 2006
Rick Flower wrote:
> In my old PHP based application, I had my code writing into my database,
> a single line indicating what each user was doing along with a timestamp
> (e.g. user X inserted record ...)
Do you want an activity log or an audit trail. "User X inserted ..."
sounds more like an audit trail. In this case, I think using database
triggers (if available) would be easier.
> Does anyone currently do this with
> any of their Seaside apps and if so, what is your philosophy?
There's a thread started 3 days ago (by me) titled
"activity logs - any ideas?"
> In my
> case, I'm using Glorp do talk to my database and would be temped to have
> some sort of method that is common to all database classes that could be
> called whenever a database operation occurs for that table (perhaps some
> sort of plug-in of sorts for Glorp?). In my case, I don't really care
> if this log is stored in the database or in a flat-file. Comments?
If you're doing audit logs, then continue using Glorp or
use database triggers, to maintain transactional integrity.
If you're doing activity logs, skip Glorp and write directly
to the database, or to a flat-file.
For the file format, choose Apache log format if it suffices,
so you can use available tools.
Another file format to choose, if you're using Postgres,
is pgdump format or copy format. That way you can easily
move the data into a database, but don't require a live
More information about the Seaside