Class Logger

java.lang.Object
org.drip.analytics.support.Logger

public class Logger
extends java.lang.Object
Logger implements level-set logging, backed by either the screen or a file. Logging always includes time stamps, and happens according to the level requested.

Author:
Lakshmi Krishnamurthy
  • Field Summary

    Fields
    Modifier and Type Field Description
    static int DEBUG
    Logger level DEBUG
    static int ERROR
    Logger level ERROR
    static int INFO
    Logger level INFO
    static int WARNING
    Logger level WARNING
  • Constructor Summary

    Constructors
    Constructor Description
    Logger()  
  • Method Summary

    Modifier and Type Method Description
    static boolean Init​(java.lang.String strConfigFile)
    Initialize the logger from a configuration file
    static boolean Log​(int iLevel, boolean bHardLog, java.lang.String strMsg)
    Log a specific message to the level

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • Logger

      public Logger()
  • Method Details

    • Init

      public static boolean Init​(java.lang.String strConfigFile)
      Initialize the logger from a configuration file
      Parameters:
      strConfigFile - Configuration file containing the logger file location
      Returns:
      boolean indicating whether initialization succeeded
    • Log

      public static boolean Log​(int iLevel, boolean bHardLog, java.lang.String strMsg)
      Log a specific message to the level
      Parameters:
      iLevel - the level of message (ERROR/WARNING/INFO/DEBUG)
      bHardLog - whether the logging is to file/DB (true) or to screen (false)
      strMsg - Message to be logged
      Returns:
      boolean indicating whether logging operation succeeded