regarding this earlier comment...

1. prepend your log message with a string : ie {customEvent} my
message. and then parse the file with a grep -v "{customEvent}" to get
your messages

grep -v will invert the match, meaning you get everything that is *not*
'{customEvent}'
...so I think you meant
grep {customEvent} log/LOGFILENAME

...also this is handy:
tail -f log/LOGFILENAME | grep {customEvent}
...click around your site and watch the log scroll by


2008/4/29 Richtermeister <[EMAIL PROTECTED]>:

>
> Thanks Thomas,
>
> that sounds like a good solution. I'll try.
>
> Have a great day,
> Daniel
>
> On Apr 28, 4:26 am, "Thomas Rabaix" <[EMAIL PROTECTED]> wrote:
> > You can solve your problem with 2 solutions :
> >
> > 1. prepend your log message with a string : ie {customEvent} my
> > message. and then parse the file with a grep -v "{customEvent}" to get
> > your messages
> >
> > 2. create a specific logger which extends the sfFileLogger, register
> > the logger to sfLogger class. then overwrite the log method to only
> > log messages which start with your {customEvent}
> >
> > Thomas
> >
> >
> >
> > On Mon, Apr 28, 2008 at 12:29 PM, Richtermeister <[EMAIL PROTECTED]>
> wrote:
> >
> > >  Yes, that would work. My issue with that approach is that "info" is a
> > >  fairly low error level, and symfony generates a lot of these per
> > >  request, so finding my custom events in those files would be tricky
> > >  methinks. Ideally I want nothing but my custom info in the log files,
> > >  and since I know what I want to log, I wouldn't even need a "level"
> > >  parameter, but for some reason all loggers out there seem to have
> > >  that..
> >
> > >  Thanks for the help,
> > >  Daniel
> >
> > >  On Apr 28, 1:31 am, Lee Bolding <[EMAIL PROTECTED]> wrote:
> > >  > Not sure about a separate log file, but isn't this what log level
> INFO
> > >  > is for?
> >
> > >  > eg. sfContext::getInstance()->getLogger()->info($message);
> >
> > >  > On 28 Apr 2008, at 06:15, Richtermeister wrote:
> >
> > >  > > Hi all,
> >
> > >  > > I'm looking to log some events in my ecommerce application,
> mainly to
> > >  > > have some data on the data that goes into the order placement
> (3rd
> > >  > > party responses etc..), so technically this information doesn't
> > >  > > qualify as "errors", and to me it seems that the logging is
> pretty
> > >  > > strictly for "unuasualities" such as errors (hence the error
> level
> > >  > > setting).
> > >  > > So my question is, how would you recommend I implement logging in
> such
> > >  > > a way that only my custom logging events appear in a specific log
> > >  > > file?
> >
> > >  > > Thank you for your help,
> > >  > > Daniel
> >
> > --
> > Thomas Rabaix
> >
> > Internet Consultant
> >
>


-- 
Charles Hilditch
Web Developer
Mob: 0415 166 137
[EMAIL PROTECTED]
http://www.crh-systems.com/

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to