Previous Page | Next Page

Appender Reference

ConsoleAppender


ConsoleAppender Overview

ConsoleAppender is a logging facility appender that supports event logging on UNIX and Windows operating systems. ConsoleAppender writes messages to the current console.


ConsoleAppender Syntax

<appender class="ConsoleAppender" name="appender-name">
<layout>
<param name="ConversionPattern" value="conversion-pattern"/>
</layout>
</appender>

ConsoleAppender Syntax Description

For information about the elements of the appender syntax, see General Appender Syntax.


ConsoleAppender Examples

The following example is a typical XML configuration file that specifies ConsoleAppender.

<?xml version="1.0" encoding="UTF-8"?>
<logging:configuration xmlns:logging="http://www.sas.com/xml/logging/1.0/">

   <appender class="ConsoleAppender" name="console">
      <layout>
         <param name="ConversionPattern" value="%d %-5p [%t] %u - %m"/>
         </layout>
   <appender>

   <!-- Adminstration message logger  -->
   <logger name="Admin">
      <level value="Error">
   </logger>

   <!-- Application message logger  -->
   <logger name="App">
      <level value="Error">
   </logger>

   <!-- Audit message logger  -->
   <logger name="Audit">
      <level value="Error">
   </logger>

   <!-- IOM protocol message logger  -->
   <logger name="IOM">
      <level value="Error">
   </logger>

   <!-- Root logger -->
   <root>
      <level value="Error"/>
      <appender-ref ref="console"/>
   </root>

</logging:configuration>

Previous Page | Next Page | Top of Page