org.apache.avalon.logging.logkit.factory.syslog
Class SyslogTargetFactory

java.lang.Object
  extended byorg.apache.avalon.logging.logkit.factory.syslog.SyslogTargetFactory
All Implemented Interfaces:
LogTargetFactory

public class SyslogTargetFactory
extends Object
implements LogTargetFactory

SyslogTargetFactory This factory creates LogTargets with a wrapped SyslogTarget around it:


 <target id="syslog"
       artifact="avalon-logging/avalon-logkit-syslog#1.0-SNAPSHOT">
   <address hostname="hostname" port="514" facility="USER"/>
   <format type="extended">
       %7.7{priority} %23.23{time:yyyy-MM-dd HH:mm:ss:SSS}   [%25.25{category}] : %{message}\n%{throwable}
   </format>
 </syslog>
 

This factory creates a SyslogTarget object which will sends syslog style messages to the specified address. The name of the target is specified by the hostname attribute of the <address> element and the port by the port attribute.The <address> element wraps the format to output the log.

Version:
$Revision: 1.4 $ $Date: 2004/03/17 10:30:08 $
Author:
Avalon Development Team

Constructor Summary
SyslogTargetFactory(FormatterFactory formatter)
           
 
Method Summary
 LogTarget createTarget(Configuration conf)
          Creates a log target based on Configuration
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SyslogTargetFactory

public SyslogTargetFactory(FormatterFactory formatter)
Method Detail

createTarget

public LogTarget createTarget(Configuration conf)
                       throws LogTargetException
Creates a log target based on Configuration

Specified by:
createTarget in interface LogTargetFactory
Parameters:
conf - Configuration requied for creating the log target
Throws:
ConfigurationException - if something goes wrong while reading from configuration
LogTargetException


Copyright © The Apache Software Foundation. All Rights Reserved.