|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.yahoo.marketing.apt.client.LogHelper
public class LogHelper
The wrapper class of the Log class in Apache's common logging library to log the soap request and response messages.
| Field Summary | |
|---|---|
private boolean |
enableLogging
Whether to enable logging. |
private org.apache.commons.logging.Log |
logger
The Log object. |
private boolean |
logSOAPMessages
Whether to log soap messages. |
| Constructor Summary | |
|---|---|
LogHelper()
Default constructor. |
|
LogHelper(org.apache.commons.logging.Log log)
Constructor to instantiate LogHelper with the given Log object. |
|
LogHelper(java.util.Properties logConfig)
Constructor to instantiate LogHelper by reading log configuration options from logConfig. |
|
LogHelper(java.lang.String configFilename)
Constructor to instantiate LogHelper by reading log configuration options from property file configFilename. |
|
| Method Summary | |
|---|---|
void |
debug(java.lang.String message)
Log message as debug message, if enableLogging is true. |
void |
debug(org.apache.axis.client.Stub serviceStub)
Log the soap request and response message as debug message, if both logSOAPMessages and enableLogging are true. |
void |
debug(org.apache.axis.client.Stub serviceStub,
java.lang.String message)
Log the soap request and response message together with message as debug message,
if both logSOAPMessages and enableLogging are true. |
void |
error(java.lang.String message)
Log message as error message, if enableLogging is true. |
void |
error(org.apache.axis.client.Stub serviceStub)
Log the soap request and response message as error message, if both logSOAPMessages and enableLogging are true. |
void |
error(org.apache.axis.client.Stub serviceStub,
java.lang.String message)
Log the soap request and response message together with message as error message,
if both logSOAPMessages and enableLogging are true. |
void |
fatal(java.lang.String message)
Log message as fatal message, if enableLogging is true. |
void |
fatal(org.apache.axis.client.Stub serviceStub)
Log the soap request and response message as fatal message, if both logSOAPMessages and enableLogging are true. |
void |
fatal(org.apache.axis.client.Stub serviceStub,
java.lang.String message)
Log the soap request and response message together with message as fatal message,
if both logSOAPMessages and enableLogging are true. |
org.apache.commons.logging.Log |
getLogger()
Return the current Log object |
java.lang.String |
getMessageAsString(org.apache.axis.Message message)
Return soap request or response as String from the message. |
void |
info(java.lang.String message)
Log message as info message, if enableLogging is true. |
void |
info(org.apache.axis.client.Stub serviceStub)
Log the soap request and response message as info message, if both logSOAPMessages and enableLogging are true. |
void |
info(org.apache.axis.client.Stub serviceStub,
java.lang.String message)
Log the soap request and response message together with message as info message,
if both logSOAPMessages and enableLogging are true. |
boolean |
isEnableLogging()
Return the current value of enableLogging. |
boolean |
isLogSOAPMessages()
Return the current value of logSOAPMessages. |
void |
log(java.lang.String message,
java.lang.String methodName)
Log the message as type of methodName if enableLogging
is true. |
void |
log(org.apache.axis.client.Stub serviceStub,
java.lang.String message,
java.lang.String methodName)
Log the soap request and response message together with message,
if both logSOAPMessages and enableLogging are true. |
void |
setEnableLogging(boolean enableLogging)
Set the value of enableLogging. |
void |
setLogger(org.apache.commons.logging.Log logger)
Provide the customized Log object. |
void |
setLogSOAPMessages(boolean logSOAPMessages)
Set the value of logSOAPMessages. |
private void |
setup(java.util.Properties logConfig)
Do the work of construction. |
void |
trace(java.lang.String message)
Log message as trace message, if enableLogging is true. |
void |
trace(org.apache.axis.client.Stub serviceStub)
Log the soap request and response message as trace message, if both logSOAPMessages and enableLogging are true. |
void |
trace(org.apache.axis.client.Stub serviceStub,
java.lang.String message)
Log the soap request and response message together with message as trace message,
if both logSOAPMessages and enableLogging are true. |
void |
warn(java.lang.String message)
Log message as warn message, if enableLogging is true. |
void |
warn(org.apache.axis.client.Stub serviceStub)
Log the soap request and response message as warn message, if both logSOAPMessages and enableLogging are true. |
void |
warn(org.apache.axis.client.Stub serviceStub,
java.lang.String message)
Log the soap request and response message together with message as warn message,
if both logSOAPMessages and enableLogging are true. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private org.apache.commons.logging.Log logger
private boolean enableLogging
enableLogging is set to true.
private boolean logSOAPMessages
logSOAPMessages is set to false.
| Constructor Detail |
|---|
public LogHelper()
throws java.io.IOException
java.io.IOExceptionpublic LogHelper(org.apache.commons.logging.Log log)
public LogHelper(java.util.Properties logConfig)
logConfig.
logConfig - the Properties object containing the log configuration options.
public LogHelper(java.lang.String configFilename)
throws java.io.IOException
configFilename.
configFilename - the Property file containing the log configuration options.
java.io.IOException| Method Detail |
|---|
private void setup(java.util.Properties logConfig)
logConfig - the Properties object containing the log configuration options.public void trace(java.lang.String message)
message as trace message, if enableLogging is true.
message - the message to be logged.public void info(java.lang.String message)
message as info message, if enableLogging is true.
message - the message to be logged.public void debug(java.lang.String message)
message as debug message, if enableLogging is true.
message - the message to be logged.public void warn(java.lang.String message)
message as warn message, if enableLogging is true.
message - the message to be logged.public void error(java.lang.String message)
message as error message, if enableLogging is true.
message - the message to be logged.public void fatal(java.lang.String message)
message as fatal message, if enableLogging is true.
message - the message to be logged.
public void trace(org.apache.axis.client.Stub serviceStub,
java.lang.String message)
message as trace message,
if both logSOAPMessages and enableLogging are true.
serviceStub - the Stub object containing the soap request and response message.message - will be logged before the soap request and response message.
public void info(org.apache.axis.client.Stub serviceStub,
java.lang.String message)
message as info message,
if both logSOAPMessages and enableLogging are true.
serviceStub - the Stub object containing the soap request and response message.message - will be logged before the soap request and response message.
public void debug(org.apache.axis.client.Stub serviceStub,
java.lang.String message)
message as debug message,
if both logSOAPMessages and enableLogging are true.
serviceStub - the Stub object containing the soap request and response message.message - will be logged before the soap request and response message.
public void warn(org.apache.axis.client.Stub serviceStub,
java.lang.String message)
message as warn message,
if both logSOAPMessages and enableLogging are true.
serviceStub - the Stub object containing the soap request and response message.message - will be logged before the soap request and response message.
public void error(org.apache.axis.client.Stub serviceStub,
java.lang.String message)
message as error message,
if both logSOAPMessages and enableLogging are true.
serviceStub - the Stub object containing the soap request and response message.message - will be logged before the soap request and response message.
public void fatal(org.apache.axis.client.Stub serviceStub,
java.lang.String message)
message as fatal message,
if both logSOAPMessages and enableLogging are true.
serviceStub - the Stub object containing the soap request and response message.message - will be logged before the soap request and response message.public void trace(org.apache.axis.client.Stub serviceStub)
logSOAPMessages and enableLogging are true.
serviceStub - the Stub object containing the soap request and response messagepublic void info(org.apache.axis.client.Stub serviceStub)
logSOAPMessages and enableLogging are true.
serviceStub - the Stub object containing the soap request and response messagepublic void debug(org.apache.axis.client.Stub serviceStub)
logSOAPMessages and enableLogging are true.
serviceStub - the Stub object containing the soap request and response messagepublic void warn(org.apache.axis.client.Stub serviceStub)
logSOAPMessages and enableLogging are true.
serviceStub - the Stub object containing the soap request and response messagepublic void error(org.apache.axis.client.Stub serviceStub)
logSOAPMessages and enableLogging are true.
serviceStub - the Stub object containing the soap request and response messagepublic void fatal(org.apache.axis.client.Stub serviceStub)
logSOAPMessages and enableLogging are true.
serviceStub - the Stub object containing the soap request and response message
public void log(java.lang.String message,
java.lang.String methodName)
message as type of methodName if enableLogging
is true.
message - the message to be logged.methodName - the log method to be called. They include: trace, debug, info, warn, error and fatal.
public void log(org.apache.axis.client.Stub serviceStub,
java.lang.String message,
java.lang.String methodName)
message,
if both logSOAPMessages and enableLogging are true.
serviceStub - the Stub object containing the soap request and response messagemessage - will be logged before the soap request and response message if the message object is not nullmethodName - the log method to be called. They include: trace, debug, info, warn, error and fatal.public org.apache.commons.logging.Log getLogger()
public void setLogger(org.apache.commons.logging.Log logger)
logger - public boolean isEnableLogging()
public void setEnableLogging(boolean enableLogging)
true.
enableLogging - public boolean isLogSOAPMessages()
public void setLogSOAPMessages(boolean logSOAPMessages)
true and logging is enabled (setEnableLogging(true)).
logSOAPMessages -
public java.lang.String getMessageAsString(org.apache.axis.Message message)
throws org.apache.axis.AxisFault,
java.lang.Exception
message.
message - the soap request or response Message object
org.apache.axis.AxisFault
java.lang.Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||