Web Analytics Made Easy - Statcounter
Skip to content

File SBCLog.hpp#

FileList > Core > Log > SBCLog.hpp

  • #include "SBCLogManager.hpp"
  • #include <iostream>
  • #include <string.h>
  • #include "SBCClass.hpp"

Macros#

Type Name
define SB_ANALYTICS (message)
A macro to log an analytics message.
define SB_CHECK_DURATION (stmt, thresholdSeconds)
A macro that encapsulates the code stmt , by creating a timer before it, measuring the code duration, and printing the duration information if it was larger thanthresholdSeconds .
define SB_CHECK_DURATION_1 (stmt)
define SB_CHRONO
define SB_ERROR (message)
A macro to log an error message.
define SB_FILENAME
define SB_FUNCTION
define SB_ID_STRING
define SB_INFORMATION (message)
A macro to log an information message.
define SB_INT_TO_STRING (a)
define SB_INT_TO_STRING2 (a)
define SB_LINE
define SB_PRINT_DEBUG (message)
A macro to output into std::cout a debug message with the file name, function name, and line number.
define SB_SAMSON_LOG_LEVEL
define SB_STACK_HISTORY (message)
A macro to log a stack history message.
define SB_TIMER_CREATE (timerName)
A macro to create a timer with the name timerName .
define SB_TIMER_CREATE_1 (...)
define SB_TIMER_MEASURE_PRINT (timerName, thresholdSeconds)
A macro to measure the timer with the name timerName and print the duration if it was larger thanthresholdSeconds .
define SB_TIMER_MEASURE_PRINT_1 (...)
define SB_TIMER_MEASURE_PRINT_CUMULATIVE (timerName, thresholdSeconds)
define SB_TIMER_MEASURE_PRINT_CUMULATIVE_1 (...)
define SB_TIMER_PRINT (timerName, thresholdSeconds)
define SB_TIMER_PRINT_1 (...)
define SB_TIMER_REUSE (timerName)
A macro to reuse a timer with the name timerName .
define SB_TIMER_REUSE_1 (...)
define SB_TRACE (...)
SB_TRACE is not defined.
define SB_WARNING (message)
A macro to log a warning message.

Macro Definition Documentation#

define SB_ANALYTICS#

A macro to log an analytics message.

#define SB_ANALYTICS (
    message
) 

Parameters:

  • message The message, std::string type

define SB_CHECK_DURATION#

A macro that encapsulates the code stmt , by creating a timer before it, measuring the code duration, and printing the duration information if it was larger thanthresholdSeconds .

#define SB_CHECK_DURATION (
    stmt,
    thresholdSeconds
) 

Parameters:

  • stmt The code which duration you would like to check
  • thresholdSeconds The threshold in seconds for printing the timer duration, double

define SB_CHECK_DURATION_1#

#define SB_CHECK_DURATION_1 (
    stmt
) 

define SB_CHRONO#

#define SB_CHRONO 

define SB_ERROR#

A macro to log an error message.

#define SB_ERROR (
    message
) 

Parameters:

  • message The message, std::string type

define SB_FILENAME#

#define SB_FILENAME 

define SB_FUNCTION#

#define SB_FUNCTION 

define SB_ID_STRING#

#define SB_ID_STRING 

define SB_INFORMATION#

A macro to log an information message.

#define SB_INFORMATION (
    message
) 

Parameters:

  • message The message, std::string type

define SB_INT_TO_STRING#

#define SB_INT_TO_STRING (
    a
) 

define SB_INT_TO_STRING2#

#define SB_INT_TO_STRING2 (
    a
) 

define SB_LINE#

#define SB_LINE 

define SB_PRINT_DEBUG#

A macro to output into std::cout a debug message with the file name, function name, and line number.

#define SB_PRINT_DEBUG (
    message
) 

Parameters:

  • message The message, std::string type

define SB_SAMSON_LOG_LEVEL#

#define SB_SAMSON_LOG_LEVEL 

define SB_STACK_HISTORY#

A macro to log a stack history message.

#define SB_STACK_HISTORY (
    message
) 

Parameters:

  • message The message, std::string type

define SB_TIMER_CREATE#

A macro to create a timer with the name timerName .

#define SB_TIMER_CREATE (
    timerName
) 

Parameters:

  • timerName The timer's name, std::string type

define SB_TIMER_CREATE_1#

#define SB_TIMER_CREATE_1 (
    ...
) 

define SB_TIMER_MEASURE_PRINT#

A macro to measure the timer with the name timerName and print the duration if it was larger thanthresholdSeconds .

#define SB_TIMER_MEASURE_PRINT (
    timerName,
    thresholdSeconds
) 

Parameters:

  • timerName The timer's name, std::string type
  • thresholdSeconds The threshold in seconds for printing the timer duration, double

define SB_TIMER_MEASURE_PRINT_1#

#define SB_TIMER_MEASURE_PRINT_1 (
    ...
) 

define SB_TIMER_MEASURE_PRINT_CUMULATIVE#

#define SB_TIMER_MEASURE_PRINT_CUMULATIVE (
    timerName,
    thresholdSeconds
) 

Parameters:

  • timerName The timer's name, std::string type
  • thresholdSeconds The threshold in seconds for printing the timer duration, double

define SB_TIMER_MEASURE_PRINT_CUMULATIVE_1#

#define SB_TIMER_MEASURE_PRINT_CUMULATIVE_1 (
    ...
) 

define SB_TIMER_PRINT#

#define SB_TIMER_PRINT (
    timerName,
    thresholdSeconds
) 

Parameters:

  • timerName The timer's name, std::string type
  • thresholdSeconds The threshold in seconds for printing the timer duration, double

define SB_TIMER_PRINT_1#

#define SB_TIMER_PRINT_1 (
    ...
) 

define SB_TIMER_REUSE#

A macro to reuse a timer with the name timerName .

#define SB_TIMER_REUSE (
    timerName
) 

Parameters:

  • timerName The timer's name, std::string type

define SB_TIMER_REUSE_1#

#define SB_TIMER_REUSE_1 (
    ...
) 

define SB_TRACE#

SB_TRACE is not defined.

#define SB_TRACE (
    ...
) 


define SB_WARNING#

A macro to log a warning message.

#define SB_WARNING (
    message
) 

Parameters:

  • message The message, std::string type