org.mondemand.log4j
Class MonDemandAppender

java.lang.Object
  extended by org.apache.log4j.AppenderSkeleton
      extended by org.mondemand.log4j.MonDemandAppender
All Implemented Interfaces:
org.apache.log4j.Appender, org.apache.log4j.spi.OptionHandler

public class MonDemandAppender
extends org.apache.log4j.AppenderSkeleton

This is a log4j appender that uses the MonDemand API and is configured with the LWES transport.

Author:
Michael Lum

Field Summary
 
Fields inherited from class org.apache.log4j.AppenderSkeleton
closed, errorHandler, headFilter, layout, name, tailFilter, threshold
 
Constructor Summary
MonDemandAppender()
           
 
Method Summary
 void activateOptions()
           
protected  void append(org.apache.log4j.spi.LoggingEvent event)
           
 void close()
           
 String getAddress()
          Gets the LWES address
 int getImmediateSendLevel()
          Gets the immediate send level for this appender.
 String getInterface()
          Gets the LWES network interface
 int getPort()
          Gets the LWES port
 String getProgId()
          Gets the program identifier for this appender.
 int getTtl()
          Gets the LWES network TTL (for multicast)
 boolean requiresLayout()
          LOG4J HOOKS *
 void setAddress(String address)
          Sets the LWES address
 void setImmediateSendLevel(int level)
          Sets the immediate send level for this appender.
 void setInterface(String iface)
          Sets the LWES network interface
 void setPort(int port)
          Sets the LWES port
 void setProgId(String progId)
          Sets the program identifier for this appender.
 void setTtl(int ttl)
          Sets the LWES network TTL (for multicast)
 
Methods inherited from class org.apache.log4j.AppenderSkeleton
addFilter, clearFilters, doAppend, finalize, getErrorHandler, getFilter, getFirstFilter, getLayout, getName, getThreshold, isAsSevereAsThreshold, setErrorHandler, setLayout, setName, setThreshold
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MonDemandAppender

public MonDemandAppender()
Method Detail

setProgId

public void setProgId(String progId)
Sets the program identifier for this appender.

Parameters:
progId - the program identifier

getProgId

public String getProgId()
Gets the program identifier for this appender.

Returns:
the program identifier

setImmediateSendLevel

public void setImmediateSendLevel(int level)
Sets the immediate send level for this appender.

Parameters:
level - the log level to send messages immediately

getImmediateSendLevel

public int getImmediateSendLevel()
Gets the immediate send level for this appender.

Returns:
the log level where messages are sent immediately

setAddress

public void setAddress(String address)
Sets the LWES address

Parameters:
address - the address to use

getAddress

public String getAddress()
Gets the LWES address

Returns:
the IP address LWES is using

setPort

public void setPort(int port)
Sets the LWES port

Parameters:
port - the port to use

getPort

public int getPort()
Gets the LWES port

Returns:
the port LWES is using

setInterface

public void setInterface(String iface)
Sets the LWES network interface

Parameters:
iface - the interface to use

getInterface

public String getInterface()
Gets the LWES network interface

Returns:
the interface in use

setTtl

public void setTtl(int ttl)
Sets the LWES network TTL (for multicast)

Parameters:
ttl - the TTL to use

getTtl

public int getTtl()
Gets the LWES network TTL (for multicast)

Returns:
the TTL value

requiresLayout

public boolean requiresLayout()
LOG4J HOOKS *


close

public void close()

activateOptions

public void activateOptions()
Specified by:
activateOptions in interface org.apache.log4j.spi.OptionHandler
Overrides:
activateOptions in class org.apache.log4j.AppenderSkeleton

append

protected void append(org.apache.log4j.spi.LoggingEvent event)
Specified by:
append in class org.apache.log4j.AppenderSkeleton


Copyright © 2012. All Rights Reserved.