cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alejandro Revilla <...@cs.com.uy>
Subject Re: C2 Logging
Date Sun, 11 Jun 2000 16:06:21 GMT
> 
> Uh, found this very old message I flagged for comment. Sorry. Better
> later than never :)
> 
Nice to get a reply. Thanks!

> 
> Sounds very much like Avalon's Omero, doesn't it?
>  
Main difference seems to be this is not a 'LogLevel'
oriented Logger, no DEBUG, INFORMATION, WARNING, stuff
here. Just realms and custom tags that eventually can
be filtered/processed/formatted by custom LogListeners.

You can always use "debug", "information", etc. tags if
you want, though.

> 
> Hmmmm, kind of verbose.
>  
Yes and no. You have listeners that can filter and pretty-print
LogEvents, and your Objects may implement "Loggeable" with 
custom not-so-verbose formatting. Better yet, with little
effort we can be able to generate SAX events that would
simplify LogListeners ability to filter selected messages.

> 
> Hmmmm, may create performance problems.
>  
That depends on LogListener(s) implementation(s).
They can implement their own decoupling stuff.
(i.e. OperatorLogListener does exactly that to avoid 
performance problems while sending e-mail).

In some heavy used portions of code you may want to avoid
LogEvent creation if there's no listeners, something like
this:

  if (loggger.hasListeners()) {
    LogEvent logevt = new LogEvent(......);
    ...
    ...
    Logger.log (logevt);
  }

--Alejandro


Mime
View raw message