Slice Tools
  • Home
  • SourceForge Page


  • libFoundation
  • Home
  • Class Hierarchy
  • Class List
  • Class Members
  • Examples


  • SourceForge.net Logo
     

    LogMsg Class Reference

    #include <LogMsg.hh>

    List of all members.


    Detailed Description

    Holds information for each item to be logged.

    Holds the raw string, message level, category information, and other attributes of each item to send to the log.


    Public Member Functions

     LogMsg (std::string msg, CategoryInformation *category, MessageLevel messageLevel, int pid, bool forceLog=false)
     Constructor sets parameters, and timestamps creation.

    void setMsgCount (int msgCount)
     Sets the message count.

    int getPID () const
     Gets the pid.

    int getMsgCount () const
     Gets the message count.

    time_t getTimeStamp () const
     Gets the timestamp in time_t format.

    MessageLevel getMessageLevel () const
     Gets the message level of the LogMsg.

    std::string getMessageLevelStr () const
     Gets a string with the name of the message level.

    std::string getCategory () const
     Gets the category name.

    const std::string & getMsg () const
     Gets the msg std::string.

    bool doLog () const
     Returns if message should be logged or not.

    bool isFatal () const
     Determines if message is at MESSAGE_LEVEL_DEBUG_ERROR or lower.


    Constructor & Destructor Documentation

    LogMsg::LogMsg std::string  msg,
    CategoryInformation category,
    MessageLevel  messageLevel,
    int  pid,
    bool  forceLog = false
     

    Constructor sets parameters, and timestamps creation.


    Member Function Documentation

    bool LogMsg::doLog  )  const
     

    Returns if message should be logged or not.

    m_doLog is set at creation in case category changes before message is ready. m_doLog is set based on if the category filterLevel and this message's messageLevel, but can be overwritten by using the forcelog flag at creation.

    std::string LogMsg::getCategory  )  const
     

    Gets the category name.

    MessageLevel LogMsg::getMessageLevel  )  const
     

    Gets the message level of the LogMsg.

    std::string LogMsg::getMessageLevelStr  )  const
     

    Gets a string with the name of the message level.

    Converts known message levels into symbolic form

    const std::string & LogMsg::getMsg  )  const
     

    Gets the msg std::string.

    int LogMsg::getMsgCount  )  const
     

    Gets the message count.

    int LogMsg::getPID  )  const
     

    Gets the pid.

    time_t LogMsg::getTimeStamp  )  const
     

    Gets the timestamp in time_t format.

    bool LogMsg::isFatal  )  const
     

    Determines if message is at MESSAGE_LEVEL_DEBUG_ERROR or lower.

    Returns:
    If message is fatal

    void LogMsg::setMsgCount int  msgCount  ) 
     

    Sets the message count.


    The documentation for this class was generated from the following files: