org.mondemand.log4j

Class MonDemandAppender


public class MonDemandAppender
extends AppenderSkeleton

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

Method Summary

void
activateOptions()
protected void
append(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)

Method Details

activateOptions

public void activateOptions()

append

protected void append(LoggingEvent event)

close

public void close()

getAddress

public String getAddress()
Gets the LWES address
Returns:
the IP address LWES is using

getImmediateSendLevel

public int getImmediateSendLevel()
Gets the immediate send level for this appender.
Returns:
the log level where messages are sent immediately

getInterface

public String getInterface()
Gets the LWES network interface
Returns:
the interface in use

getPort

public int getPort()
Gets the LWES port
Returns:
the port LWES is using

getProgId

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

getTtl

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

requiresLayout

public boolean requiresLayout()
LOG4J HOOKS *

setAddress

public void setAddress(String address)
Sets the LWES address
Parameters:
address - the address to use

setImmediateSendLevel

public void setImmediateSendLevel(int level)
Sets the immediate send level for this appender.
Parameters:
level - the log level to send messages immediately

setInterface

public void setInterface(String iface)
Sets the LWES network interface
Parameters:
iface - the interface to use

setPort

public void setPort(int port)
Sets the LWES port
Parameters:
port - the port to use

setProgId

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

setTtl

public void setTtl(int ttl)
Sets the LWES network TTL (for multicast)
Parameters:
ttl - the TTL to use