Robox Library for Cpp: tools module 1.0.0
RLibCpp utilities toolset
Public Types | Static Public Member Functions | Static Public Attributes | List of all members
Log Class Reference

Simple wrapper class to help logging messages. More...

#include <log.h>

Public Types

typedef const char * p_const_char
 Pointer to const character.
 

Static Public Member Functions

static void logInformation (const String &msg, const String &prefix=String(MSG_PREFIX))
 Log an information message.
 
static void logWarning (const String &msg, const String &prefix=String(WRN_PREFIX))
 Log a warning message.
 
static void logError (const String &msg, const String &prefix=String(ERR_PREFIX))
 Log an error message.
 

Static Public Attributes

static const p_const_char MSG_PREFIX
 Default prefix for information messages.
 
static const p_const_char WRN_PREFIX
 Default prefix for warning messages.
 
static const p_const_char ERR_PREFIX
 Default prefix for error messages.
 

Detailed Description

Simple wrapper class to help logging messages.

Member Typedef Documentation

◆ p_const_char

typedef const char* p_const_char

Pointer to const character.

Member Function Documentation

◆ logError()

static void logError ( const String & msg,
const String & prefix = String(ERR_PREFIX) )
static

Log an error message.

Parameters
msgThe message to log
prefixThe prefix for the message

◆ logInformation()

static void logInformation ( const String & msg,
const String & prefix = String(MSG_PREFIX) )
static

Log an information message.

Parameters
msgThe message to log
prefixThe prefix for the message

◆ logWarning()

static void logWarning ( const String & msg,
const String & prefix = String(WRN_PREFIX) )
static

Log a warning message.

Parameters
msgThe message to log
prefixThe prefix for the message

Member Data Documentation

◆ ERR_PREFIX

const p_const_char ERR_PREFIX
static

Default prefix for error messages.

◆ MSG_PREFIX

const p_const_char MSG_PREFIX
static

Default prefix for information messages.

◆ WRN_PREFIX

const p_const_char WRN_PREFIX
static

Default prefix for warning messages.