Class ManifestReaderLogging

  • Direct Known Subclasses:
    ManifestReader

    public abstract class ManifestReaderLogging
    extends Object
    This class is the base of all the manifest readers providing a standardized mechanism of logging
    • Constructor Summary

      Constructors 
      Constructor Description
      ManifestReaderLogging()
      Constructs an empty Manifest Reader
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected abstract String getContextStr()
      Get the context string associated with the Model to include with the log statements
      boolean getDebugLog()
      Get the current setting for debug logging
      void logDebug​(String methodName, String log)
      log information conditionally based on debug setting using the info level of the logger
      void logError​(String methodName, String log)
      log a string at the error setting
      void logError​(String methodName, String log, Throwable e)
      log a string and a throwable information at the error setting
      void logError​(String methodName, Throwable e)
      log a throwables information at the error setting
      void logInfo​(String methodName, String log)
      Log a string at the info setting
      void logWarn​(String methodName, String log)
      log a string at the warn setting
      boolean setDebugLog​(boolean debugLog)
      Enable/disable debug logging.
      void setUseSystemOut​(boolean useSystemOut)
      specify whether to log using System.out rather than the default (log4j)
      boolean usingSystemOut()
      Get the setting controlling the debug output to System.out (vs log4j)
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ManifestReaderLogging

        public ManifestReaderLogging()
        Constructs an empty Manifest Reader
    • Method Detail

      • setDebugLog

        public boolean setDebugLog​(boolean debugLog)
        Enable/disable debug logging.
        Parameters:
        debugLog -
        Returns:
        boolean value of the debug log setting before applying the new setting
      • getDebugLog

        public boolean getDebugLog()
        Get the current setting for debug logging
        Returns:
        true debug logging is enabled
      • setUseSystemOut

        public void setUseSystemOut​(boolean useSystemOut)
        specify whether to log using System.out rather than the default (log4j)
        Parameters:
        useSystemOut -
      • usingSystemOut

        public boolean usingSystemOut()
        Get the setting controlling the debug output to System.out (vs log4j)
        Returns:
        true if using System.out for logging
      • logDebug

        public void logDebug​(String methodName,
                             String log)
        log information conditionally based on debug setting using the info level of the logger
        Parameters:
        methodName - - method name to include in the log statement
        log - - the string to log
      • logInfo

        public void logInfo​(String methodName,
                            String log)
        Log a string at the info setting
        Parameters:
        methodName - - method name to include in the log statement
        log - - the string to log
      • logWarn

        public void logWarn​(String methodName,
                            String log)
        log a string at the warn setting
        Parameters:
        methodName - - method name to include in the log statement
        log - - the string to log
      • logError

        public void logError​(String methodName,
                             String log)
        log a string at the error setting
        Parameters:
        methodName - - method name to include in the log statement
        log - - the string to log
      • logError

        public void logError​(String methodName,
                             String log,
                             Throwable e)
        log a string and a throwable information at the error setting
        Parameters:
        methodName - - method name to include in the log statement
        log - - the string to log
        e - - the throwable exception to log the information about
      • logError

        public void logError​(String methodName,
                             Throwable e)
        log a throwables information at the error setting
        Parameters:
        methodName - - method name to include in the log statement
        e - - the throwable exception to log the information about
      • getContextStr

        protected abstract String getContextStr()
        Get the context string associated with the Model to include with the log statements
        Returns:
        String