cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <>
Subject Re: AW: New log formatter
Date Tue, 24 Jul 2001 12:48:56 GMT

Carsten Ziegeler a écrit :
> > Sylvain Wallez wrote:
> >
> > Carsten Ziegeler a écrit :
> > >
> > > One final note:
> > >
> > > What about formatting the LogEvent to XML? So we could create easily
> > > create a generator reading the log file, a stylesheet filtering
> > > it and then displaying everything on the client.
> > >
> > I already thought about this. XML is fine for machine processing, but
> > verbose for human reading. So the question is : how do we use the log
> > file ? Personnaly, I have it opened in a text editor that prompts me for
> > reload whenever it changes (on Unix I would use tail -f).
> >
> Yes, I nearly do the same. But there are often situations where you don't
> have a unix shell available or even worse no direct access to the server's
> local file system.
> Using XML as output is in my opinion as readable as the text format, but
> it has the disadvantage of being more verbose. That's right, but is this
> really a problem? For example,
> "DEBUG   99597   [cocoon  ] (main): Using configuration file: /cocoon.xconf"
> could read with xml:
> <event>
>    <priority>DEBUG</priority>
>    <time>99597</time>
>    ...
> </event>
> The only real problem, is that with xml you get more than one line per log
> entry.
> > Reloading and reloading an ever growing web page to follow the log
> > doesn't seem as efficient as following a raw text file. But maybe you
> > have some better use cases for an XMLized log !
> >
> Yes, filtering it is the main approach. Imagine a server where more than
> one person is testing on at a time. If the log is in xml format you could
> easily write a stylesheet filtering the log on a per request basis, so each
> person gets only the entries which affects his work etc.
> And you can get the log in every format from every you want using a simple
> http request. And you can choose the layout for this, you can highlight the
> important information and leave out the uneccesary etc.
> I know filtering etc. can be done with some unix command line tools as well,
> but as cocoon itself heavily deals with xml, I thought we should use it as
> much as possible, making cocoon itself consistent.
> Carsten

Ok, I see your point. The simpliest implementation can be inputing an
XPath expression in a form and having matching log events displayed !
Useful filtering will require much more information to be logged. I
understand now the need for IP address, user name, and the like.

Filtering possibilities are endless, but will make the log file bigger
and bigger...
Sylvain Wallez
Anyware Technologies -

To unsubscribe, e-mail:
For additional commands, email:

View raw message