public class IMAppender
extends org.apache.log4j.AppenderSkeleton
Constructor and Description |
---|
IMAppender()
The default constructor will instantiate the appender with a
default TriggeringEventEvaluator that will trigger on events
with level ERROR or higher.
|
IMAppender(org.apache.log4j.spi.TriggeringEventEvaluator evaluator) |
Modifier and Type | Method and Description |
---|---|
void |
activateOptions()
Options are activated and become effective only after calling
this method.
|
void |
append(org.apache.log4j.spi.LoggingEvent event)
This method called by
AppenderSkeleton.doAppend(org.apache.log4j.spi.LoggingEvent) method
does most of the real appending work. |
protected boolean |
checkEntryConditions()
This method determines if there is a sense in attempting to append.
|
void |
close()
Close this IMAppender.
|
int |
getBufferSize() |
String |
getEvaluatorClass() |
String |
getHost() |
String |
getNickname() |
String |
getPassword() |
int |
getPort() |
String |
getRecipient() |
String |
getUsername() |
boolean |
isChatroom() |
boolean |
isSSL() |
boolean |
requiresLayout()
The IMAppender requires a layout.
|
protected void |
sendBuffer()
Send the contents of the cyclic buffer as an IM message.
|
void |
setBufferSize(int bufferSize) |
void |
setChatroom(boolean chatroom) |
void |
setEvaluatorClass(String value)
The EvaluatorClass option takes a string value
representing the name of the class implementing the
TriggeringEventEvaluator interface. |
void |
setHost(String host) |
void |
setNickname(String nickname) |
void |
setPassword(String password) |
void |
setPort(int port) |
void |
setRecipient(String recipient) |
void |
setSSL(boolean enableSSL) |
void |
setUsername(String username) |
public IMAppender()
public IMAppender(org.apache.log4j.spi.TriggeringEventEvaluator evaluator)
public String getHost()
public void setHost(String host)
public int getPort()
public void setPort(int port)
public String getUsername()
public void setUsername(String username)
public String getPassword()
public void setPassword(String password)
public String getRecipient()
public void setRecipient(String recipient)
public boolean isChatroom()
public void setChatroom(boolean chatroom)
public String getNickname()
public void setNickname(String nickname)
public boolean isSSL()
public void setSSL(boolean enableSSL)
public int getBufferSize()
public void setBufferSize(int bufferSize)
public void setEvaluatorClass(String value)
TriggeringEventEvaluator
interface. A corresponding object will
be instantiated and assigned as the triggering event evaluator
for the SMTPAppender.public String getEvaluatorClass()
public void activateOptions()
activateOptions
in interface org.apache.log4j.spi.OptionHandler
activateOptions
in class org.apache.log4j.AppenderSkeleton
public void close()
public void append(org.apache.log4j.spi.LoggingEvent event)
AppenderSkeleton.doAppend(org.apache.log4j.spi.LoggingEvent)
method
does most of the real appending work. Adds the event to a buffer
and checks if the event triggers a message to be sent.append
in class org.apache.log4j.AppenderSkeleton
protected void sendBuffer()
protected boolean checkEntryConditions()
It checks whether there is an output chat available and also if
there is a set layout. If these checks fail, then the boolean
value false
is returned.
public boolean requiresLayout()
true
.Copyright © 2016 WSO2 Inc. All rights reserved.