You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lenya.apache.org by Andreas Hartmann <an...@apache.org> on 2004/09/24 11:54:41 UTC

Common usecase logging concept

Hi Lenya developers,

yesterday I tried to trace the operations of a user,
which was quite annonying because of the lack of a common
logging concept.

I think we need a component which is responsible of
managing a log for anything that goes on in a Lenya
application from a user's point of view.

I imagine something like

---------------------------------------

UsecaseLogger log = this.manager.lookup(UsecaseLogger.ROLE);

log.startUsecase(pub, usecaseName, situation);

try {
     ...
     log.log(message); // usecase logger gathers messages
                       // and creates XML snippet
     ...
}

// make sure the usecase logger can write the XML snippet
finally {
     log.endUsecase(pub, usecaseName, situation);
}
---------------------------------------

The log ends up in an XML structure which can be
queried for reports. I think the UsecaseLogger could
just be a wrapper around an existing logging system
(maybe it is possible to configure the Avalon logger
to write XML).

WDYT? Any experiences in this area?

-- Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-dev-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-dev-help@cocoon.apache.org


Re: Common usecase logging concept

Posted by Rolf Kulemann <ro...@apache.org>.
On Fri, 2004-09-24 at 14:18, Andreas Hartmann wrote:
> Jean Pierre LeJacq wrote:
> > On Fri, 24 Sep 2004, Andreas Hartmann wrote:
> > 
> > 
> >>I think we need a component which is responsible of
> >>managing a log for anything that goes on in a Lenya
> >>application from a user's point of view.
> >>
> >>I imagine something like
> >>
> >>UsecaseLogger log = this.manager.lookup(UsecaseLogger.ROLE);
> >>
> >>log.startUsecase(pub, usecaseName, situation);
> >>
> >>... snip ...
> >>
> >>The log ends up in an XML structure which can be
> >>queried for reports. I think the UsecaseLogger could
> >>just be a wrapper around an existing logging system
> >>(maybe it is possible to configure the Avalon logger
> >>to write XML).
> > 
> > 
> > I'm concerned that this would introduce yet another logging
> > interface along with logkit and log4j (and system.out).
> 
> Yes, I share this concern. But these logging APIs are
> too general, so I intended to add a more high-level
> layer on top one of them. It has to be ensured that
> all client components log the same kind of information
> in the same way, so that querying is possible.

+1 to add a high level usecase logging api on top of standard ones.

-- 
Rolf Kulemann


---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-dev-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-dev-help@cocoon.apache.org


Re: Common usecase logging concept

Posted by Andreas Hartmann <an...@apache.org>.
Jean Pierre LeJacq wrote:
> On Fri, 24 Sep 2004, Andreas Hartmann wrote:
> 
> 
>>I think we need a component which is responsible of
>>managing a log for anything that goes on in a Lenya
>>application from a user's point of view.
>>
>>I imagine something like
>>
>>UsecaseLogger log = this.manager.lookup(UsecaseLogger.ROLE);
>>
>>log.startUsecase(pub, usecaseName, situation);
>>
>>... snip ...
>>
>>The log ends up in an XML structure which can be
>>queried for reports. I think the UsecaseLogger could
>>just be a wrapper around an existing logging system
>>(maybe it is possible to configure the Avalon logger
>>to write XML).
> 
> 
> I'm concerned that this would introduce yet another logging
> interface along with logkit and log4j (and system.out).

Yes, I share this concern. But these logging APIs are
too general, so I intended to add a more high-level
layer on top one of them. It has to be ensured that
all client components log the same kind of information
in the same way, so that querying is possible.

> Is this
> intended for development or for end use administration.

For end use administration.

> If the
> later, then this might make sense though I would prefer to base it
> on one of the many existing logging systems.

Yes, this certainly makes sense.

-- Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-dev-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-dev-help@cocoon.apache.org


Re: Common usecase logging concept

Posted by Jean Pierre LeJacq <jp...@quoininc.com>.
On Fri, 24 Sep 2004, Andreas Hartmann wrote:

> I think we need a component which is responsible of
> managing a log for anything that goes on in a Lenya
> application from a user's point of view.
>
> I imagine something like
>
> UsecaseLogger log = this.manager.lookup(UsecaseLogger.ROLE);
>
> log.startUsecase(pub, usecaseName, situation);
>
> ... snip ...
>
> The log ends up in an XML structure which can be
> queried for reports. I think the UsecaseLogger could
> just be a wrapper around an existing logging system
> (maybe it is possible to configure the Avalon logger
> to write XML).

I'm concerned that this would introduce yet another logging
interface along with logkit and log4j (and system.out).  Is this
intended for development or for end use administration.  If the
later, then this might make sense though I would prefer to base it
on one of the many existing logging systems.

-- 
JP



---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-dev-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-dev-help@cocoon.apache.org