Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Example Logging

  • Python

    Code Block
    languagepy
    linenumberstrue
    collapsetrue
    logger = self.getLogger()
    logger.logTrace("...")
    logger.logDebug("...")
    logger.logInfo("...")
    logger.logWarning("...")
    logger.logError("...")
    
    #An example
    logger.info("A real log with a string '%s' and an int (%d)" % ("Log Entry", 3))
  • Java

    Code Block
    languagejava
    linenumberstrue
    collapsetrue
    m_logger.finer("...");
    m_logger.fine("...");
    m_logger.info("...");
    m_logger.warning("...");
    m_logger.severe("...");
    
    
    #An example
    m_logger.info("A real log with a string '" + "Log Entry" + "' and an int (" + String.valueOf(3) + ")");
  • C++

    Code Block
    languagecpp
    linenumberstrue
    collapsetrue
    ACS_TRACE("...");
    ACS_DEBUG("...");
    ACS_SHORT_LOG((LM_INFO, "..."));
    ACS_SHORT_LOG((LM_WARNING, "..."));
    ACS_SHORT_LOG((LM_ERROR, "..."));
    
    
    //An example
    ACS_SHORT_LOG((LM_INFO, "A real log with a string '%s' and an int (%d)", "Log Entry", 3));

...