You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by Patrick Hess <pa...@metazoa.de> on 2002/01/30 12:58:56 UTC
Logging in Phoenix
Hi,
I'm playing with phoenix and SAR files and I find it uncomfortable
to check the logfiles for errors & exception. I'm sure there is
a way to log all the stuff to the console - but where? ;) Can
anybody point my nose to the right place to search for this information?
Another topic for me the ComponentSelector stuff:
the DataSourceComponentSelector/ExcaliburComponentSelector as
described in the excellent "Developing with Avalon" text works
for me - but I'm not able to do this with own (basic) components:
is there a good point to read/explore code to get this working?
Patrick Hess
| metazoa GmbH | fon +49-211-175447-20 |
| Erkrather Str. 206 | fax +49-211-175447-27 |
| 40233 Düsseldorf | mail p.hess@metazoa.de |
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: Logging in Phoenix
Posted by Stephen McConnell <mc...@osm.net>.
> -----Original Message-----
> From: Patrick Hess [mailto:patrick.hess@metazoa.de]
> Sent: Thursday, 31 January, 2002 15:47
> To: Avalon Developers List
> Subject: Re: Logging in Phoenix
>
>
>
> Eung-ju Park wrote:
>
> > Hi.
> >
> > Use version 1.1 logger in environment.xml. like bellow...
>
>
> Thanks! This helped a lot!!
>
> Can anybody tell me difference between
>
> org.apache.avalon.framework.logger.Logger
This is a implementation independent logging interface. When you
invoke operation on this the actual logging operartion gets passed
to your preferred implementation (LogKit, Log4J, JDK1.4 logging, etc.).
> org.apache.logger.Logger
This is the LogKit logging implementation that is typically
wrapped within a org.apache.avalon.framework.logger.Logger.
Cheers, Steve.
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Logging in Phoenix
Posted by Patrick Hess <pa...@metazoa.de>.
Eung-ju Park wrote:
> Hi.
>
> Use version 1.1 logger in environment.xml. like bellow...
Thanks! This helped a lot!!
Can anybody tell me difference between
org.apache.avalon.framework.logger.Logger
org.apache.logger.Logger
Both appear but they are not compatible?!
Patrick Hess
| metazoa GmbH | fon +49-211-175447-20 |
| Erkrather Str. 206 | fax +49-211-175447-27 |
| 40233 Düsseldorf | mail p.hess@metazoa.de |
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Logging in Phoenix
Posted by Eung-ju Park <co...@apache.org>.
----- Original Message -----
From: "Patrick Hess" <pa...@metazoa.de>
To: "Avalon Developers List" <av...@jakarta.apache.org>
Sent: Wednesday, January 30, 2002 8:58 PM
Subject: Logging in Phoenix
>
> Hi,
>
> I'm playing with phoenix and SAR files and I find it uncomfortable
> to check the logfiles for errors & exception. I'm sure there is
> a way to log all the stuff to the console - but where? ;) Can
> anybody point my nose to the right place to search for this information?
Hi.
Use version 1.1 logger in environment.xml. like bellow...
<logs version="1.1">
<factories>
<factory type="block"
class="org.apache.avalon.excalibur.logger.factory.FileTargetFactory"/>
</factories>
<categories>
<category name="" log-level="DEBUG">
<log-target id-ref="default"/>
</category>
</categories>
<targets>
<block id="default">
<filename>${app.home}/logs/rts-stock.log</filename>
<append>false</append>
<format type="pattern"><![CDATA[%{time} [%7.7{priority}]
<<%{category}>>: %{message}\n%{throwable}]]></format>
</block>
</targets>
</logs>
and use StreamTargetFactory. see javadoc of
org.apache.avalon.excalibur.logger.factory.StreamTargetFactory for
configuration.
>
> Another topic for me the ComponentSelector stuff:
> the DataSourceComponentSelector/ExcaliburComponentSelector as
> described in the excellent "Developing with Avalon" text works
> for me - but I'm not able to do this with own (basic) components:
> is there a good point to read/explore code to get this working?
>
> Patrick Hess
>
> | metazoa GmbH | fon +49-211-175447-20 |
> | Erkrather Str. 206 | fax +49-211-175447-27 |
> | 40233 Düsseldorf | mail p.hess@metazoa.de |
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Logging in Phoenix
Posted by Peter Royal <pr...@managingpartners.com>.
On Wednesday 30 January 2002 06:58 am, Patrick Hess wrote:
> I'm playing with phoenix and SAR files and I find it uncomfortable
> to check the logfiles for errors & exception. I'm sure there is
> a way to log all the stuff to the console - but where? ;) Can
> anybody point my nose to the right place to search for this information?
Write your own LogTargetFactory. I've attached my ScreenTargetFactory that
you can use as a starting point. You'll have to remove a few lines in
getFormatter() that reference a custom Formatter.
This will only assist you in dumping out your SAR's logfiles to System.out.
The logfile that phoenix generates is still output to disk only (but the only
exceptions I find in there are failures of my SAR to init/start successfully).
-pete
--
peter royal -> proyal@managingpartners.com