Monero
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
el::base::TypedConfigurations Class Reference

Configurations with data types. More...

#include <easylogging++.h>

Inheritance diagram for el::base::TypedConfigurations:
Inheritance graph
[legend]
Collaboration diagram for el::base::TypedConfigurations:
Collaboration graph
[legend]

Public Member Functions

 TypedConfigurations (Configurations *configurations, base::LogStreamsReferenceMap *logStreamsReference)
 Constructor to initialize (construct) the object off el::Configurations.
 
 TypedConfigurations (const TypedConfigurations &other)
 
virtual ~TypedConfigurations (void)
 
const Configurationsconfigurations (void) const
 
bool enabled (Level level)
 
bool toFile (Level level)
 
const std::string & filename (Level level)
 
bool toStandardOutput (Level level)
 
const base::LogFormatlogFormat (Level level)
 
const base::SubsecondPrecisionsubsecondPrecision (Level level=Level::Global)
 
const base::MillisecondsWidthmillisecondsWidth (Level level=Level::Global)
 
bool performanceTracking (Level level=Level::Global)
 
base::type::fstream_tfileStream (Level level)
 
std::size_t maxLogFileSize (Level level)
 
std::size_t logFlushThreshold (Level level)
 
- Public Member Functions inherited from el::base::threading::ThreadSafe
virtual void acquireLock (void) ELPP_FINAL
 
virtual void releaseLock (void) ELPP_FINAL
 
virtual base::threading::Mutexlock (void) ELPP_FINAL
 

Private Member Functions

template<typename Conf_T >
Conf_T getConfigByVal (Level level, const std::unordered_map< Level, Conf_T > *confMap, const char *confName)
 
template<typename Conf_T >
Conf_T & getConfigByRef (Level level, std::unordered_map< Level, Conf_T > *confMap, const char *confName)
 
template<typename Conf_T >
Conf_T unsafeGetConfigByVal (Level level, const std::unordered_map< Level, Conf_T > *confMap, const char *confName)
 
template<typename Conf_T >
Conf_T & unsafeGetConfigByRef (Level level, std::unordered_map< Level, Conf_T > *confMap, const char *confName)
 
template<typename Conf_T >
void setValue (Level level, const Conf_T &value, std::unordered_map< Level, Conf_T > *confMap, bool includeGlobalLevel=true)
 
void build (Configurations *configurations)
 
unsigned long getULong (std::string confVal)
 
std::string resolveFilename (const std::string &filename)
 
void insertFile (Level level, const std::string &fullFilename)
 
bool unsafeValidateFileRolling (Level level, const PreRollOutCallback &preRollOutCallback)
 
bool validateFileRolling (Level level, const PreRollOutCallback &preRollOutCallback)
 

Private Attributes

Configurationsm_configurations
 
std::unordered_map< Level, boolm_enabledMap
 
std::unordered_map< Level, boolm_toFileMap
 
std::unordered_map< Level, std::string > m_filenameMap
 
std::unordered_map< Level, boolm_toStandardOutputMap
 
std::unordered_map< Level, base::LogFormatm_logFormatMap
 
std::unordered_map< Level, base::SubsecondPrecisionm_subsecondPrecisionMap
 
std::unordered_map< Level, boolm_performanceTrackingMap
 
std::unordered_map< Level, base::FileStreamPtrm_fileStreamMap
 
std::unordered_map< Level, std::size_t > m_maxLogFileSizeMap
 
std::unordered_map< Level, std::size_t > m_logFlushThresholdMap
 
base::LogStreamsReferenceMapm_logStreamsReference
 

Friends

class el::Helpers
 
class el::base::MessageBuilder
 
class el::base::Writer
 
class el::base::DefaultLogDispatchCallback
 
class el::base::LogDispatcher
 

Additional Inherited Members

- Protected Member Functions inherited from el::base::threading::ThreadSafe
 ThreadSafe (void)
 
virtual ~ThreadSafe (void)
 

Detailed Description

Configurations with data types.

@detail el::Configurations have string based values. This is whats used internally in order to read correct configurations. This is to perform faster while writing logs using correct configurations.

This is thread safe and final class containing non-virtual destructor (means nothing should inherit this class)

Constructor & Destructor Documentation

◆ TypedConfigurations() [1/2]

el::base::TypedConfigurations::TypedConfigurations ( Configurations * configurations,
base::LogStreamsReferenceMap * logStreamsReference )

Constructor to initialize (construct) the object off el::Configurations.

Parameters
configurationsConfigurations pointer/reference to base this typed configurations off.
logStreamsReferenceUse ELPP->registeredLoggers()->logStreamsReference()

◆ TypedConfigurations() [2/2]

el::base::TypedConfigurations::TypedConfigurations ( const TypedConfigurations & other)

◆ ~TypedConfigurations()

virtual el::base::TypedConfigurations::~TypedConfigurations ( void )
inlinevirtual

Member Function Documentation

◆ build()

void el::base::TypedConfigurations::build ( Configurations * configurations)
private

◆ configurations()

const Configurations * el::base::TypedConfigurations::configurations ( void ) const
inline

◆ enabled()

bool el::base::TypedConfigurations::enabled ( Level level)

◆ filename()

const std::string & el::base::TypedConfigurations::filename ( Level level)

◆ fileStream()

base::type::fstream_t * el::base::TypedConfigurations::fileStream ( Level level)

◆ getConfigByRef()

template<typename Conf_T >
Conf_T & el::base::TypedConfigurations::getConfigByRef ( Level level,
std::unordered_map< Level, Conf_T > * confMap,
const char * confName )
inlineprivate

◆ getConfigByVal()

template<typename Conf_T >
Conf_T el::base::TypedConfigurations::getConfigByVal ( Level level,
const std::unordered_map< Level, Conf_T > * confMap,
const char * confName )
inlineprivate

◆ getULong()

unsigned long el::base::TypedConfigurations::getULong ( std::string confVal)
private

◆ insertFile()

void el::base::TypedConfigurations::insertFile ( Level level,
const std::string & fullFilename )
private

◆ logFlushThreshold()

std::size_t el::base::TypedConfigurations::logFlushThreshold ( Level level)

◆ logFormat()

const base::LogFormat & el::base::TypedConfigurations::logFormat ( Level level)

◆ maxLogFileSize()

std::size_t el::base::TypedConfigurations::maxLogFileSize ( Level level)

◆ millisecondsWidth()

const base::MillisecondsWidth & el::base::TypedConfigurations::millisecondsWidth ( Level level = Level::Global)

◆ performanceTracking()

bool el::base::TypedConfigurations::performanceTracking ( Level level = Level::Global)

◆ resolveFilename()

std::string el::base::TypedConfigurations::resolveFilename ( const std::string & filename)
private

◆ setValue()

template<typename Conf_T >
void el::base::TypedConfigurations::setValue ( Level level,
const Conf_T & value,
std::unordered_map< Level, Conf_T > * confMap,
bool includeGlobalLevel = true )
inlineprivate

◆ subsecondPrecision()

const base::SubsecondPrecision & el::base::TypedConfigurations::subsecondPrecision ( Level level = Level::Global)

◆ toFile()

bool el::base::TypedConfigurations::toFile ( Level level)

◆ toStandardOutput()

bool el::base::TypedConfigurations::toStandardOutput ( Level level)

◆ unsafeGetConfigByRef()

template<typename Conf_T >
Conf_T & el::base::TypedConfigurations::unsafeGetConfigByRef ( Level level,
std::unordered_map< Level, Conf_T > * confMap,
const char * confName )
inlineprivate

◆ unsafeGetConfigByVal()

template<typename Conf_T >
Conf_T el::base::TypedConfigurations::unsafeGetConfigByVal ( Level level,
const std::unordered_map< Level, Conf_T > * confMap,
const char * confName )
inlineprivate

◆ unsafeValidateFileRolling()

bool el::base::TypedConfigurations::unsafeValidateFileRolling ( Level level,
const PreRollOutCallback & preRollOutCallback )
private

◆ validateFileRolling()

bool el::base::TypedConfigurations::validateFileRolling ( Level level,
const PreRollOutCallback & preRollOutCallback )
inlineprivate

Friends And Related Symbol Documentation

◆ el::base::DefaultLogDispatchCallback

◆ el::base::LogDispatcher

friend class el::base::LogDispatcher
friend

◆ el::base::MessageBuilder

friend class el::base::MessageBuilder
friend

◆ el::base::Writer

friend class el::base::Writer
friend

◆ el::Helpers

friend class el::Helpers
friend

Member Data Documentation

◆ m_configurations

Configurations* el::base::TypedConfigurations::m_configurations
private

◆ m_enabledMap

std::unordered_map<Level, bool> el::base::TypedConfigurations::m_enabledMap
private

◆ m_filenameMap

std::unordered_map<Level, std::string> el::base::TypedConfigurations::m_filenameMap
private

◆ m_fileStreamMap

std::unordered_map<Level, base::FileStreamPtr> el::base::TypedConfigurations::m_fileStreamMap
private

◆ m_logFlushThresholdMap

std::unordered_map<Level, std::size_t> el::base::TypedConfigurations::m_logFlushThresholdMap
private

◆ m_logFormatMap

std::unordered_map<Level, base::LogFormat> el::base::TypedConfigurations::m_logFormatMap
private

◆ m_logStreamsReference

base::LogStreamsReferenceMap* el::base::TypedConfigurations::m_logStreamsReference
private

◆ m_maxLogFileSizeMap

std::unordered_map<Level, std::size_t> el::base::TypedConfigurations::m_maxLogFileSizeMap
private

◆ m_performanceTrackingMap

std::unordered_map<Level, bool> el::base::TypedConfigurations::m_performanceTrackingMap
private

◆ m_subsecondPrecisionMap

std::unordered_map<Level, base::SubsecondPrecision> el::base::TypedConfigurations::m_subsecondPrecisionMap
private

◆ m_toFileMap

std::unordered_map<Level, bool> el::base::TypedConfigurations::m_toFileMap
private

◆ m_toStandardOutputMap

std::unordered_map<Level, bool> el::base::TypedConfigurations::m_toStandardOutputMap
private

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