[Catalyst] best practice for a protocol mechanism?

Alexander Hartmaier alexander.hartmaier at t-systems.at
Mon Sep 14 11:44:53 GMT 2009


Sounds to me like an audit log which should be done by the model
regardless of where the model is used (e.g. Catalyst app, perl script
run by cron, ...).

That's the module you want imho:
http://search.cpan.org/~nuffin/DBIx-Class-Journal-0.900001_02/lib/DBIx/Class/Journal.pm

Am Donnerstag, den 10.09.2009, 14:43 +0200 schrieb Jens Schwarz:
> Oh, *err* right. I meant 'logging' and not 'protocol' *douh*.
>
> Well, right now I have a proto^Wlogging action in my Root controller that I call everytime I want something to be logged in my DB.
> P.ex.:
>
> package MyApp::Controller::Book;
> (...)
> sub create ... {
> ...
> $c->forward("MyApp::Controller::Root","myLoggingAction",["some message that should be logged"]);
> }
>
> In addition to this, I have a logging controller, that simply displays the list of logged messages from the DB.
>
> Think of something like:
>
> | Timestamp        | User   | Action           |
> +------------------+--------+------------------+
> | 2009-09-10 10:30 | foobar | created new book |
>
> So the question is: Is there a neater way of doing this? Some kind of best practice?
>
>
> -------- Original-Nachricht --------
> > Datum: Thu, 10 Sep 2009 01:41:29 +0100
> > Von: Tomas Doran <bobtfish at bobtfish.net>
> > An: The elegant MVC web framework <catalyst at lists.scsys.co.uk>
> > Betreff: Re: [Catalyst] best practice for a protocol mechanism?
>
> > I'm guesstimating that he means 'I end up with this template code at
> > the end of loads of my actions, which forwards somewhere with various
> > params'...
>
> Now *I* am not entirely sure that I understand what you mean by this. :)
>
> Jens
>
--
LG Alex


*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
T-Systems Austria GesmbH   Rennweg 97-99, 1030 Wien
Handelsgericht Wien, FN 79340b
*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
Notice: This e-mail contains information that is confidential and may be privileged.
If you are not the intended recipient, please notify the sender and then
delete this e-mail immediately.
*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*



More information about the Catalyst mailing list