Class ConfigLog

java.lang.Object
com.portal.common.ConfigLog

public class ConfigLog extends Object
This class provides the log mechanisms specific to the various Loader utilities. This provides methods which would log messages based on the "-d"(for debug) and "-v"(for verbose) flags set in the command line when invoking the loader utilities.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    This method is used to initialize the ConfigLog object with the command line options specified for the loader.
    static void
    log(Object source, int nFlag, String objErrorInfo)
    This method is used to log a message
    static void
    log(Object source, int nFlag, Throwable objErrorInfo)
    This method is used to log a message
    static void
    log(String sMessage)
    This method is used to log a message
    static void
    logAndExit(String sMessage, int nExitCode)
    This method is used to log a message and exit

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ConfigLog

      public ConfigLog()
  • Method Details

    • init

      public static void init(LoaderOptions options)
      This method is used to initialize the ConfigLog object with the command line options specified for the loader. Only the debug and verbose flags are looked up
      Parameters:
      options - The options used for invoking the loader
    • logAndExit

      public static void logAndExit(String sMessage, int nExitCode)
      This method is used to log a message and exit
      Parameters:
      sMessage - The message logged
      nExitCode - exit code
    • log

      public static void log(Object source, int nFlag, String objErrorInfo)
      This method is used to log a message
      Parameters:
      source - The source of the message
      nFlag - exit code
      objErrorInfo - the string describing the error information
    • log

      public static void log(Object source, int nFlag, Throwable objErrorInfo)
      This method is used to log a message
      Parameters:
      source - The source of the message
      nFlag - exit code
      objErrorInfo - the exception that needs to be logged
    • log

      public static void log(String sMessage)
      This method is used to log a message
      Parameters:
      sMessage - The message logged