Syslog: White Paper FAQ Examples JavaDoc
Protomatter Classes v1.1.6

com.protomatter.syslog
Class SimpleSyslogMailSubjectFormatter

java.lang.Object
  |
  +--com.protomatter.syslog.SimpleSyslogMailSubjectFormatter
All Implemented Interfaces:
SyslogMailSubjectFormatter

public class SimpleSyslogMailSubjectFormatter
extends java.lang.Object
implements SyslogMailSubjectFormatter

A simple mail subject formatter. This class is used by default by the MailLog logger.

See Also:
MailLog, XML configuration class

Constructor Summary
SimpleSyslogMailSubjectFormatter()
          Default constructor.
 
Method Summary
 java.lang.String formatMessageSubject(SyslogMessage message)
          Format the given log entry.
protected  java.lang.String getHostname(java.net.InetAddress host)
           
 boolean getShowChannel()
          Get wether we should show the channel name in the output.
 boolean getShowHostName()
          Get wether we should show the host name in the output.
 boolean getShowThreadName()
          Get wether we should show the thread name in the output.
protected  java.lang.String getStringForLevel(int level)
           
 void setShowChannel(boolean showChannel)
          Set wether we should show the channel name in the output.
 void setShowHostName(boolean showHostName)
          Set wether we should show the host name in the output.
 void setShowThreadName(boolean showThreadName)
          Set wether we should show the thread name in the output.
protected  java.lang.String trimFromLastPeriod(java.lang.String s)
          Given something like "foo.bar.Baz" this will return "Baz".
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleSyslogMailSubjectFormatter

public SimpleSyslogMailSubjectFormatter()
Default constructor.
Method Detail

formatMessageSubject

public java.lang.String formatMessageSubject(SyslogMessage message)
Format the given log entry.
Specified by:
formatMessageSubject in interface SyslogMailSubjectFormatter

getStringForLevel

protected java.lang.String getStringForLevel(int level)

getHostname

protected java.lang.String getHostname(java.net.InetAddress host)

setShowHostName

public void setShowHostName(boolean showHostName)
Set wether we should show the host name in the output.

getShowHostName

public boolean getShowHostName()
Get wether we should show the host name in the output.

setShowThreadName

public void setShowThreadName(boolean showThreadName)
Set wether we should show the thread name in the output.

getShowThreadName

public boolean getShowThreadName()
Get wether we should show the thread name in the output.

setShowChannel

public void setShowChannel(boolean showChannel)
Set wether we should show the channel name in the output.

getShowChannel

public boolean getShowChannel()
Get wether we should show the channel name in the output.

trimFromLastPeriod

protected java.lang.String trimFromLastPeriod(java.lang.String s)
Given something like "foo.bar.Baz" this will return "Baz".

Protomatter Classes v1.1.6
Copyright 1998-2001 Nate Sammons

Protomatter Classes v1.1.6 http://protomatter.sourceforge.net/1.1.6