Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
el::Logger Class Reference

Represents a logger holding ID and configurations we need to write logs. More...

#include <easylogging++.h>

Inheritance diagram for el::Logger:
Inheritance graph
[legend]

Public Member Functions

Configurationsconfigurations (void)
 
void configure (const Configurations &configurations)
 Configures the logger using specified configurations. More...
 
bool enabled (Level level) const
 
void flush (void)
 Flushes logger to sync all log files for all levels. More...
 
void flush (Level level, base::type::fstream_t *fs)
 
const std::stringid (void) const
 
bool isFlushNeeded (Level level)
 
virtual void log (el::base::type::ostream_t &os) const
 
LogBuilderlogBuilder (void) const
 
 Logger (const std::string &id, base::LogStreamsReferenceMap *logStreamsReference)
 
 Logger (const std::string &id, const Configurations &configurations, base::LogStreamsReferenceMap *logStreamsReference)
 
 Logger (const Logger &logger)
 
Loggeroperator= (const Logger &logger)
 
const std::stringparentApplicationName (void) const
 
void reconfigure (void)
 Reconfigures logger using existing configurations. More...
 
void setLogBuilder (const LogBuilderPtr &logBuilder)
 
void setParentApplicationName (const std::string &parentApplicationName)
 
base::TypedConfigurationstypedConfigurations (void)
 
virtual ~Logger (void)
 
- Public Member Functions inherited from el::base::threading::ThreadSafe
virtual void acquireLock (void) ELPP_FINAL
 
virtual base::threading::Mutexlock (void) ELPP_FINAL
 
virtual void releaseLock (void) ELPP_FINAL
 
- Public Member Functions inherited from el::Loggable
virtual ~Loggable (void)
 

Static Public Member Functions

static bool isValidId (const std::string &id)
 

Private Member Functions

void initUnflushedCount (void)
 
 Logger (void)
 
void performConfig (const Configurations &configurations)
 
void resolveLoggerFormatSpec (void) const
 
base::type::stringstream_tstream (void)
 

Private Attributes

Configurations m_configurations
 
std::string m_id
 
bool m_isConfigured
 
LogBuilderPtr m_logBuilder
 
base::LogStreamsReferenceMapm_logStreamsReference
 
std::string m_parentApplicationName
 
base::type::stringstream_t m_stream
 
base::TypedConfigurationsm_typedConfigurations
 
std::unordered_map< Level, unsigned int > m_unflushedCount
 

Friends

class el::base::DefaultLogDispatchCallback
 
class el::base::LogDispatcher
 
class el::base::MessageBuilder
 
class el::base::PerformanceTracker
 
class el::base::PErrorWriter
 
class el::base::RegisteredLoggers
 
class el::base::Storage
 
class el::base::Writer
 
class el::Helpers
 
class el::Loggers
 
class el::LogMessage
 

Additional Inherited Members

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

Detailed Description

Represents a logger holding ID and configurations we need to write logs.

This class does not write logs itself instead its used by writer to read configuations from.

Definition at line 2205 of file easylogging++.h.

Constructor & Destructor Documentation

el::Logger::Logger ( const std::string id,
base::LogStreamsReferenceMap logStreamsReference 
)

Definition at line 606 of file easylogging++.cc.

el::Logger::Logger ( const std::string id,
const Configurations configurations,
base::LogStreamsReferenceMap logStreamsReference 
)

Definition at line 615 of file easylogging++.cc.

el::Logger::Logger ( const Logger logger)

Definition at line 626 of file easylogging++.cc.

virtual el::Logger::~Logger ( void  )
inlinevirtual

Definition at line 2212 of file easylogging++.h.

el::Logger::Logger ( void  )
private

Member Function Documentation

Configurations* el::Logger::configurations ( void  )
inline

Definition at line 2238 of file easylogging++.h.

void el::Logger::configure ( const Configurations configurations)

Configures the logger using specified configurations.

Definition at line 651 of file easylogging++.cc.

bool el::Logger::enabled ( Level  level) const
inline

Definition at line 2265 of file easylogging++.h.

void el::Logger::flush ( void  )

Flushes logger to sync all log files for all levels.

Definition at line 697 of file easylogging++.cc.

void el::Logger::flush ( Level  level,
base::type::fstream_t fs 
)

Definition at line 707 of file easylogging++.cc.

const std::string& el::Logger::id ( void  ) const
inline

Definition at line 2226 of file easylogging++.h.

void el::Logger::initUnflushedCount ( void  )
private

Definition at line 721 of file easylogging++.cc.

bool el::Logger::isFlushNeeded ( Level  level)
inline

Definition at line 2253 of file easylogging++.h.

bool el::Logger::isValidId ( const std::string id)
static

Definition at line 688 of file easylogging++.cc.

virtual void el::Logger::log ( el::base::type::ostream_t os) const
inlinevirtual

Implements el::Loggable.

Definition at line 2216 of file easylogging++.h.

LogBuilder* el::Logger::logBuilder ( void  ) const
inline

Definition at line 2257 of file easylogging++.h.

Logger & el::Logger::operator= ( const Logger logger)

Definition at line 637 of file easylogging++.cc.

const std::string& el::Logger::parentApplicationName ( void  ) const
inline

Definition at line 2230 of file easylogging++.h.

void el::Logger::performConfig ( const Configurations configurations)
private

Definition at line 664 of file easylogging++.cc.

void el::Logger::reconfigure ( void  )

Reconfigures logger using existing configurations.

Definition at line 683 of file easylogging++.cc.

void el::Logger::resolveLoggerFormatSpec ( void  ) const
private

Definition at line 730 of file easylogging++.cc.

void el::Logger::setLogBuilder ( const LogBuilderPtr logBuilder)
inline

Definition at line 2261 of file easylogging++.h.

void el::Logger::setParentApplicationName ( const std::string parentApplicationName)
inline

Definition at line 2234 of file easylogging++.h.

base::type::stringstream_t& el::Logger::stream ( void  )
inlineprivate

Definition at line 2333 of file easylogging++.h.

base::TypedConfigurations* el::Logger::typedConfigurations ( void  )
inline

Definition at line 2242 of file easylogging++.h.

Friends And Related Function Documentation

Definition at line 2307 of file easylogging++.h.

friend class el::base::LogDispatcher
friend

Definition at line 2313 of file easylogging++.h.

friend class el::base::MessageBuilder
friend

Definition at line 2308 of file easylogging++.h.

friend class el::base::PerformanceTracker
friend

Definition at line 2312 of file easylogging++.h.

friend class el::base::PErrorWriter
friend

Definition at line 2310 of file easylogging++.h.

friend class el::base::RegisteredLoggers
friend

Definition at line 2306 of file easylogging++.h.

friend class el::base::Storage
friend

Definition at line 2311 of file easylogging++.h.

friend class el::base::Writer
friend

Definition at line 2309 of file easylogging++.h.

friend class el::Helpers
friend

Definition at line 2305 of file easylogging++.h.

friend class el::Loggers
friend

Definition at line 2304 of file easylogging++.h.

friend class el::LogMessage
friend

Definition at line 2303 of file easylogging++.h.

Member Data Documentation

Configurations el::Logger::m_configurations
private

Definition at line 2298 of file easylogging++.h.

std::string el::Logger::m_id
private

Definition at line 2293 of file easylogging++.h.

bool el::Logger::m_isConfigured
private

Definition at line 2297 of file easylogging++.h.

LogBuilderPtr el::Logger::m_logBuilder
private

Definition at line 2301 of file easylogging++.h.

base::LogStreamsReferenceMap* el::Logger::m_logStreamsReference
private

Definition at line 2300 of file easylogging++.h.

std::string el::Logger::m_parentApplicationName
private

Definition at line 2296 of file easylogging++.h.

base::type::stringstream_t el::Logger::m_stream
private

Definition at line 2295 of file easylogging++.h.

base::TypedConfigurations* el::Logger::m_typedConfigurations
private

Definition at line 2294 of file easylogging++.h.

std::unordered_map<Level, unsigned int> el::Logger::m_unflushedCount
private

Definition at line 2299 of file easylogging++.h.


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


librealsense2
Author(s): Sergey Dorodnicov , Doron Hirshberg , Mark Horn , Reagan Lopez , Itay Carpis
autogenerated on Mon May 3 2021 02:50:36