com.cybersource.ws.client
Class LoggerImpl

java.lang.Object
  extended by com.cybersource.ws.client.LoggerImpl
All Implemented Interfaces:
Logger

public class LoggerImpl
extends java.lang.Object
implements Logger

Default file-based implementation of the Logger interface.


Field Summary
 
Fields inherited from interface com.cybersource.ws.client.Logger
LT_EXCEPTION, LT_FAULT, LT_FILESTART, LT_INFO, LT_MERCHCFG, LT_PROXYCFG, LT_REPLY, LT_REQUEST, LT_TRANSTART
 
Constructor Summary
LoggerImpl(MerchantConfig _mc)
          Constructor.
 
Method Summary
 void log(java.lang.String type, java.lang.String text)
          Logs the text specified.
 void logTransactionStart()
          Logs an LT_TRANSTART entry.
 void prepare()
          Prepares the file by checking if it has reached the maximum size and if so, archives it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoggerImpl

public LoggerImpl(MerchantConfig _mc)
Constructor.

Parameters:
_mc - MerchantConfig object containing the logging parameters.
Method Detail

prepare

public void prepare()
             throws com.cybersource.ws.client.ConfigException
Prepares the file by checking if it has reached the maximum size and if so, archives it. It then creates a new file and logs an LT_FILESTART entry.

Specified by:
prepare in interface Logger
Throws:
ConfigException - if anything is missing or invalid in the configuration.

logTransactionStart

public void logTransactionStart()
Logs an LT_TRANSTART entry.

Specified by:
logTransactionStart in interface Logger

log

public void log(java.lang.String type,
                java.lang.String text)
Logs the text specified.

Specified by:
log in interface Logger
Parameters:
type - the log entry type.
text - the actual text to be logged.


Copyright © 2017. All Rights Reserved.