Syslog White Paper FAQ Examples JavaDoc Classloader
Protomatter Software v1.1.7

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 Software v1.1.7
Copyright 1998-2002 Nate Sammons

Protomatter Software v1.1.7 http://protomatter.sourceforge.net/1.1.7