net.codesmarts.log4j
Class SMSBugReportAppender

java.lang.Object
  extended byorg.apache.log4j.AppenderSkeleton
      extended bynet.codesmarts.log4j.AbstractBugReportAppender
          extended bynet.codesmarts.log4j.AbstractEmailBugReportAppender
              extended bynet.codesmarts.log4j.SMSBugReportAppender
All Implemented Interfaces:
org.apache.log4j.Appender, BugReportAppender, org.apache.log4j.spi.OptionHandler

public class SMSBugReportAppender
extends AbstractEmailBugReportAppender

Author:
Fred McCann

Field Summary
 
Fields inherited from class org.apache.log4j.AppenderSkeleton
closed, errorHandler, headFilter, layout, name, tailFilter, threshold
 
Constructor Summary
SMSBugReportAppender()
           
 
Method Summary
 java.lang.String getMessage(BugReport report)
          Sends the first thresholdPriority event message as the message
 java.lang.String getSubject(BugReport report)
          Implementing class decides how to create email subject
 void init()
          initialize appender (use this instead of activateOptions)
 boolean requiresLayout()
           
 void setSubject(java.lang.String subject)
          Set the subject for all SMS messages
 
Methods inherited from class net.codesmarts.log4j.AbstractEmailBugReportAppender
append, getHTMLMessage, setFrom, setHtml, setSmtpServer, setSubjectPrepend, setTo
 
Methods inherited from class net.codesmarts.log4j.AbstractBugReportAppender
activateOptions, append, close, doAppend, getHashingMethod, getHashMethod, getMaxSize, getThresholdPriority, getThresholdSize, isReportDuplicates, setHashingMethod, setLayout, setMaxSize, setReportDuplicates, setThresholdPriority, setThresholdSize
 
Methods inherited from class org.apache.log4j.AppenderSkeleton
addFilter, clearFilters, finalize, getErrorHandler, getFilter, getFirstFilter, getLayout, getName, getThreshold, isAsSevereAsThreshold, setErrorHandler, setName, setThreshold
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SMSBugReportAppender

public SMSBugReportAppender()
Method Detail

getMessage

public java.lang.String getMessage(BugReport report)
Sends the first thresholdPriority event message as the message

Specified by:
getMessage in class AbstractEmailBugReportAppender
Parameters:
report -
Returns:
See Also:
AbstractEmailBugReportAppender.getMessage(net.codesmarts.log4j.BugReport)

init

public void init()
Description copied from class: AbstractBugReportAppender
initialize appender (use this instead of activateOptions)

Overrides:
init in class AbstractEmailBugReportAppender
See Also:
AbstractBugReportAppender.init()

setSubject

public void setSubject(java.lang.String subject)
Set the subject for all SMS messages

Parameters:
subject - The subject to set.

getSubject

public java.lang.String getSubject(BugReport report)
Description copied from class: AbstractEmailBugReportAppender
Implementing class decides how to create email subject

Specified by:
getSubject in class AbstractEmailBugReportAppender
Parameters:
report -
Returns:
See Also:
AbstractEmailBugReportAppender.getSubject(net.codesmarts.log4j.BugReport)

requiresLayout

public boolean requiresLayout()
Specified by:
requiresLayout in interface org.apache.log4j.Appender
Overrides:
requiresLayout in class AbstractBugReportAppender
See Also:
Appender.requiresLayout()


Copyright © 2005 CodeSmarts. All Rights Reserved.