Package paypal.payflow
Class Logger
java.lang.Object
paypal.payflow.Logger
This is a singleton class which can be used for logging of the messages.
The logger will log all the messages to the file specified in the SDKproperties class.
By default the logging will be switched to OFF.
-
Method Summary
Modifier and TypeMethodDescriptionstatic LoggerThis will give the instance of the logger class.Get the Errors generated due to the Logger.booleanThis method logs the data to a file.Different type of severity level can be logged here.protected voidThis is a internal method and takes in a arraylist of the errorobjects as a parameter.The method goes through the array list for each errorobject found makes a call to another overloaded version of the Log method which takes in ErrorObject as a parameter.If there are some errors which have been generated by the Logger class then those are logged instead of the passed messages.protected voidlog(ErrorObject message) This is a internal method and takes in a errorobject as a parameter.This method then calls another overloaded version for the method Log which takes in a string to be logged and the severity level of the Error Object.protected ArrayListpopulateErrorDetails(ArrayList errObj) This method populates each ErrorObject int the arraylist passed, with the details from the SortedList held by the logger class.
-
Method Details
-
getInstance
This will give the instance of the logger class.- Returns:
- mInstance
-
getLoggerErrs
Get the Errors generated due to the Logger.- Returns:
- mLoggerErrs
-
log
This is a internal method and takes in a errorobject as a parameter.This method then calls another overloaded version for the method Log which takes in a string to be logged and the severity level of the Error Object.- Parameters:
message- ErrorObject
-
log
This is a internal method and takes in a arraylist of the errorobjects as a parameter.The method goes through the array list for each errorobject found makes a call to another overloaded version of the Log method which takes in ErrorObject as a parameter.If there are some errors which have been generated by the Logger class then those are logged instead of the passed messages.- Parameters:
messages- ArrayList containing the error objects
-
log
This method logs the data to a file.Different type of severity level can be logged here. The levels that can be logged are decided by the configuration settings in the SDKProperties file.- Parameters:
message- String : value that needs to be loggedseverityLvl- int : Severity level of the message.This could be one of the following:- PayflowConstants.LOGGING_OFF
- PayflowConstants.SEVERITY_FATAL
- PayflowConstants.SEVERITY_ERROR
- PayflowConstants.SEVERITY_WARN
- PayflowConstants.SEVERITY_INFO
- PayflowConstants.SEVERITY_DEBUG
- Returns:
- retVal Boolean
-
populateErrorDetails
This method populates each ErrorObject int the arraylist passed, with the details from the SortedList held by the logger class. It populates the mLoggerErrs in case the relevant message code is not found. *Populate the error object with the details
- Parameters:
errObj- ArrayList- Returns:
- errorObject ArrayList
-