Class SimpleLogSource

java.lang.Object
org.jpos.util.SimpleLogSource
All Implemented Interfaces:
LogSource
Direct Known Subclasses:
BSHTransactionParticipant, DirPoll, GenericSSLSocketFactory, VISA1Packager

public class SimpleLogSource extends Object implements LogSource
LogSources can choose to extends this SimpleLogSource
See Also:
  • Field Details

    • logger

      protected Logger logger
      The logger used by this log source.
    • realm

      protected String realm
      The logging realm for this log source.
  • Constructor Details

    • SimpleLogSource

      public SimpleLogSource()
      Default constructor.
    • SimpleLogSource

      public SimpleLogSource(Logger logger, String realm)
      Constructs a SimpleLogSource with the given logger and realm.
      Parameters:
      logger - the logger to use
      realm - the logging realm
  • Method Details

    • setLogger

      public void setLogger(Logger logger, String realm)
      Sets the logger and realm for this log source.
      Specified by:
      setLogger in interface LogSource
      Parameters:
      logger - the logger to use
      realm - the logging realm
    • getRealm

      public String getRealm()
      Returns the logging realm.
      Specified by:
      getRealm in interface LogSource
      Returns:
      the realm string
    • getLogger

      public Logger getLogger()
      Returns the logger.
      Specified by:
      getLogger in interface LogSource
      Returns:
      the logger
    • setRealm

      public void setRealm(String realm)
      Sets the logging realm.
      Parameters:
      realm - the realm string
    • info

      public void info(String detail)
      Logs an informational message.
      Parameters:
      detail - the message text
    • info

      public void info(String detail, Object obj)
      Logs an informational message with an attached object.
      Parameters:
      detail - the message text
      obj - the object to attach
    • warning

      public void warning(String detail)
      Logs a warning message.
      Parameters:
      detail - the warning text
    • warning

      public void warning(String detail, Object obj)
      Logs a warning message with an attached object.
      Parameters:
      detail - the warning text
      obj - the object to attach
    • error

      public void error(String detail)
      Logs an error message.
      Parameters:
      detail - the error text
    • error

      public void error(String detail, Object obj)
      Logs an error message with an attached object.
      Parameters:
      detail - the error text
      obj - the object to attach