avalon-phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Raj Saini <rajsa...@emerging-trade.com>
Subject Re: How to enable console logging in Phoenix
Date Thu, 21 Nov 2002 12:08:06 GMT
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.



<?xml version="1.0"?>



	  <factory type="stream" 

       <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">
         <format type="avalon">%8.8{priority} %{time:(yyyy-MM-dd) 
HH:mm.ss:SSS} [%8.8{category}] (%{thread}) %{class:short}: 


       <grant code-base="sar:SAR-INF/lib/*">
         <permission class="java.security.AllPermission" />


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.StreamTargetFactory"/ >
> 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>

View raw message