avalon-phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Short" <ssh...@postx.com>
Subject RE: How to enable console logging in Phoenix
Date Thu, 21 Nov 2002 18:11:31 GMT
Your file looks a bit different to mine, but essebtually you need to
add:

<log-target id-ref="sout"/>

To the appropriate categories.

Steve

> -----Original Message-----
> From: Raj Saini [mailto:rajsaini@emerging-trade.com] 
> Sent: Thursday, November 21, 2002 4:08 AM
> To: Avalon-Phoenix Developers List
> Subject: Re: How to enable console logging in Phoenix
> 
> 
> Hi Peter,
> 
> Thanks for the infomration.
> 
> It is not yet clear to me how to set the target to console. I have my 
> environment.xml file appended below. I shall be thankful if 
> you can make 
>   required changes in the configuration below.
> 
> Raj
> 
> ----------------------assembly.xml----------------------------
> -------------
> 
> <?xml version="1.0"?>
> 
> <environment>
> 
> 
>      <logs>
> 
> 	  <factory type="stream" 
> class="org.apache.avalon.excalibur.logger.factory.StreamTarget
> Factory"/>
> 
>        <category name="" target="default"
>                  priority="DEBUG" />
>        <category name="objectstorage" target="objectstorage-target"
>                  priority="DEBUG" />
> 
>        <log-target name="default"
>                    location="/logs/oms-server.log" />
>        <log-target name="objectstorage-target"
>                    location="/logs/objectstorage.log" />
> 
>        <stream id="sout">
>          <stream>System.out</stream>
>          <format type="avalon">%8.8{priority} %{time:(yyyy-MM-dd) 
> HH:mm.ss:SSS} [%8.8{category}] (%{thread}) %{class:short}: 
> %{message}\n%{throwable}</format>
>        </stream>
> 
>      </logs>
> 
> 
> 
> 
>      <policy>
>        <grant code-base="sar:SAR-INF/lib/*">
>          <permission class="java.security.AllPermission" />
>        </grant>
>      </policy>
> 
> </environment>
> 
> Peter Royal wrote:
> > On Wednesday, November 20, 2002, at 12:26  AM, Raj Saini wrote:
> > 
> >> The default output of logging in Phoneix is log files as defined in
> >> the assembly.xml. Is there a way to change the default output to  
> >> console?
> >>
> > 
> > Be sure you are using logging 1.1 in environment.xml. Add a factory 
> > of:
> > 
> > <factory type="stream"
> > 
> class="org.apache.avalon.excalibur.logger.factory.StreamTarget
> Factory"/ >
> > 
> > and a target of:
> > 
> >             <stream id="sout">
> >                 <stream>System.out</stream>
> >                 <format type="avalon">%8.8{priority}
> > %{time:(yyyy-MM-dd)  HH:mm.ss:SSS} [%8.8{category}] (%{thread}) 
> > %{class:short}:  %{message}\n%{throwable}</format>
> >             </stream>
> > 
> > If you give the 'id' the same value as the current default 
> logger, you
> > will have everything redirected to the console.
> > 
> > -peter
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:avalon-phoenix-dev-> unsubscribe@jakarta.apache.org>
> 
> For additional commands, 
> e-mail: <mailto:avalon-phoenix-dev-help@jakarta.apache.org>
> 
> 

--
To unsubscribe, e-mail:   <mailto:avalon-phoenix-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-phoenix-dev-help@jakarta.apache.org>


Mime
View raw message