μHAL (v2.8.17)
Part of the IPbus software repository
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Private Member Functions | Static Private Attributes | Friends | List of all members
uhal::log_configuration Class Reference

Class to restrict access to the log configuration parameters. More...

#include <uhal/log/log.hpp>

Private Member Functions

 log_configuration ()
 Constructor. More...
 
virtual ~log_configuration ()
 Destructor. More...
 

Static Private Attributes

static bool mLoggingIncludesFatal = true
 static bool storing whether the Fatal level is to be included in the log output More...
 
static bool mLoggingIncludesError = true
 static bool storing whether the Error level is to be included in the log output More...
 
static bool mLoggingIncludesWarning = true
 static bool storing whether the Warning level is to be included in the log output More...
 
static bool mLoggingIncludesNotice = true
 static bool storing whether the Notice level is to be included in the log output More...
 
static bool mLoggingIncludesInfo = true
 static bool storing whether the Info level is to be included in the log output More...
 
static bool mLoggingIncludesDebug = false
 static bool storing whether the Debug level is to be included in the log output More...
 
static const bool mTrue = true
 Define a static const member variable to have a value of true so that we can safely return a const reference to true. More...
 
static const bool mFalse = false
 Define a static const member variable to have a value of false so that we can safely return a const reference to false. More...
 
static std::mutex mMutex
 Define a static Mutex lock for thread safe logging. More...
 

Friends

void disableLogging ()
 Function to disable all logging levels. More...
 
void setLogLevelTo (const FatalLevel &)
 Make setLogLevelTo function a friend so it can access our private members. More...
 
const bool & LoggingIncludes (const FatalLevel &)
 Make LoggingIncludes function a friend so it can access our private members. More...
 
void setLogLevelTo (const ErrorLevel &)
 Make setLogLevelTo function a friend so it can access our private members. More...
 
const bool & LoggingIncludes (const ErrorLevel &)
 Make LoggingIncludes function a friend so it can access our private members. More...
 
void setLogLevelTo (const WarningLevel &)
 Make setLogLevelTo function a friend so it can access our private members. More...
 
const bool & LoggingIncludes (const WarningLevel &)
 Make LoggingIncludes function a friend so it can access our private members. More...
 
void setLogLevelTo (const NoticeLevel &)
 Make setLogLevelTo function a friend so it can access our private members. More...
 
const bool & LoggingIncludes (const NoticeLevel &)
 Make LoggingIncludes function a friend so it can access our private members. More...
 
void setLogLevelTo (const InfoLevel &)
 Make setLogLevelTo function a friend so it can access our private members. More...
 
const bool & LoggingIncludes (const InfoLevel &)
 Make LoggingIncludes function a friend so it can access our private members. More...
 
void setLogLevelTo (const DebugLevel &)
 Make setLogLevelTo function a friend so it can access our private members. More...
 
const bool & LoggingIncludes (const DebugLevel &)
 Make LoggingIncludes function a friend so it can access our private members. More...
 
std::mutex & GetLoggingMutex ()
 Make GetLoggingMutex function a friend so it can access our private members. More...
 

Detailed Description

Class to restrict access to the log configuration parameters.

Definition at line 101 of file log.hpp.

Constructor & Destructor Documentation

◆ log_configuration()

uhal::log_configuration::log_configuration ( )
private

Constructor.

◆ ~log_configuration()

virtual uhal::log_configuration::~log_configuration ( )
privatevirtual

Destructor.

Friends And Related Function Documentation

◆ disableLogging

void disableLogging ( )
friend

Function to disable all logging levels.

Definition at line 64 of file log.cpp.

◆ GetLoggingMutex

std::mutex & GetLoggingMutex ( )
friend

Make GetLoggingMutex function a friend so it can access our private members.

Definition at line 78 of file log.cpp.

◆ LoggingIncludes [1/6]

const bool & LoggingIncludes ( const DebugLevel )
friend

Make LoggingIncludes function a friend so it can access our private members.

Returns
whether the level Debug is to be included in the log output

Definition at line 249 of file log.cpp.

◆ LoggingIncludes [2/6]

const bool & LoggingIncludes ( const ErrorLevel )
friend

Make LoggingIncludes function a friend so it can access our private members.

Returns
whether the level Error is to be included in the log output

Definition at line 121 of file log.cpp.

◆ LoggingIncludes [3/6]

const bool & LoggingIncludes ( const FatalLevel )
friend

Make LoggingIncludes function a friend so it can access our private members.

Returns
whether the level Fatal is to be included in the log output

Definition at line 99 of file log.cpp.

◆ LoggingIncludes [4/6]

const bool & LoggingIncludes ( const InfoLevel )
friend

Make LoggingIncludes function a friend so it can access our private members.

Returns
whether the level Info is to be included in the log output

Definition at line 211 of file log.cpp.

◆ LoggingIncludes [5/6]

const bool & LoggingIncludes ( const NoticeLevel )
friend

Make LoggingIncludes function a friend so it can access our private members.

Returns
whether the level Notice is to be included in the log output

Definition at line 177 of file log.cpp.

◆ LoggingIncludes [6/6]

const bool & LoggingIncludes ( const WarningLevel )
friend

Make LoggingIncludes function a friend so it can access our private members.

Returns
whether the level Warning is to be included in the log output

Definition at line 147 of file log.cpp.

◆ setLogLevelTo [1/6]

void setLogLevelTo ( const DebugLevel )
friend

Make setLogLevelTo function a friend so it can access our private members.

Definition at line 227 of file log.cpp.

◆ setLogLevelTo [2/6]

void setLogLevelTo ( const ErrorLevel )
friend

Make setLogLevelTo function a friend so it can access our private members.

Definition at line 107 of file log.cpp.

◆ setLogLevelTo [3/6]

void setLogLevelTo ( const FatalLevel )
friend

Make setLogLevelTo function a friend so it can access our private members.

Definition at line 87 of file log.cpp.

◆ setLogLevelTo [4/6]

void setLogLevelTo ( const InfoLevel )
friend

Make setLogLevelTo function a friend so it can access our private members.

Definition at line 191 of file log.cpp.

◆ setLogLevelTo [5/6]

void setLogLevelTo ( const NoticeLevel )
friend

Make setLogLevelTo function a friend so it can access our private members.

Definition at line 159 of file log.cpp.

◆ setLogLevelTo [6/6]

void setLogLevelTo ( const WarningLevel )
friend

Make setLogLevelTo function a friend so it can access our private members.

Definition at line 131 of file log.cpp.

Member Data Documentation

◆ mFalse

const bool uhal::log_configuration::mFalse = false
staticprivate

Define a static const member variable to have a value of false so that we can safely return a const reference to false.

Definition at line 155 of file log.hpp.

◆ mLoggingIncludesDebug

bool uhal::log_configuration::mLoggingIncludesDebug = false
staticprivate

static bool storing whether the Debug level is to be included in the log output

Definition at line 146 of file log.hpp.

◆ mLoggingIncludesError

bool uhal::log_configuration::mLoggingIncludesError = true
staticprivate

static bool storing whether the Error level is to be included in the log output

Definition at line 118 of file log.hpp.

◆ mLoggingIncludesFatal

bool uhal::log_configuration::mLoggingIncludesFatal = true
staticprivate

static bool storing whether the Fatal level is to be included in the log output

Definition at line 111 of file log.hpp.

◆ mLoggingIncludesInfo

bool uhal::log_configuration::mLoggingIncludesInfo = true
staticprivate

static bool storing whether the Info level is to be included in the log output

Definition at line 139 of file log.hpp.

◆ mLoggingIncludesNotice

bool uhal::log_configuration::mLoggingIncludesNotice = true
staticprivate

static bool storing whether the Notice level is to be included in the log output

Definition at line 132 of file log.hpp.

◆ mLoggingIncludesWarning

bool uhal::log_configuration::mLoggingIncludesWarning = true
staticprivate

static bool storing whether the Warning level is to be included in the log output

Definition at line 125 of file log.hpp.

◆ mMutex

std::mutex uhal::log_configuration::mMutex
staticprivate

Define a static Mutex lock for thread safe logging.

Definition at line 160 of file log.hpp.

◆ mTrue

const bool uhal::log_configuration::mTrue = true
staticprivate

Define a static const member variable to have a value of true so that we can safely return a const reference to true.

Definition at line 153 of file log.hpp.


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