Would you consider adding this example to docs?

On Fri, 22 Nov 2002 05:33, Peter Royal wrote:
> On Thursday, November 21, 2002, at 04:08  AM, Raj Saini wrote:
> > 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.
>
> Use the below block as the "logs" section of your environment.xml
> -pete
>
>       <logs version="1.1">
>               <!--+ FACTORIES
>                     +   Factories define various types of output targets for log
> messages
>                     +-->
>               <factories>
>                       <factory type="stream"
> class="org.apache.avalon.excalibur.logger.factory.StreamTargetFactory"/ >
>               </factories>
>               <!--+ TARGETS
>                     +   Targets are named destinations of log events. Tag names for
> child
>                     +   elements, such as 'file' or 'screen', correspond to factory
> types above.
>                     +-->
>               <targets>
>                       <!-- Outputs events to the screen. -->
>                       <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>
>               </targets>
>               <!--+ CATEGORIES
>                     +   Categories are named sinks for the application to output
> events to.
>                     +   First level category names correspond to block names in
> assembly.xml.
>                     +
>                     +   Each category has an attribute named log-level that
> controls the severity
>                     +   of messages to records. Valid severities are:
>                     +     DEBUG, INFO, WARN, ERROR, FATAL_ERROR
>                     +
>                     +   Each category can have children of other categories, and
> log-target elements
>                     +   log-target elements have an id-ref attribute that
> references the id of a target
>                     +   in the targets section.
>                     +-->
>               <categories>
>                       <!-- anything that doesn't fit into the above categories falls 
>into
> here -->
>                       <category name="" log-level="DEBUG">
>                  <log-target id-ref="sout"/>
>                       </category>
>               </categories>
>       </logs>

-- 
Cheers,

Peter Donald
 "Man's mind stretched to a new idea never goes back to its original 
dimensions." -Oliver Wendell Holmes 


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to