Electroneum
el::base::Storage Class Reference

Easylogging++ management storage. More...

#include <easylogging++.h>

Inheritance diagram for el::base::Storage:
Collaboration diagram for el::base::Storage:

Public Member Functions

 Storage (const LogBuilderPtr &defaultLogBuilder)
 
virtual ~Storage (void)
 
bool validateEveryNCounter (const char *filename, base::type::LineNumber lineNumber, std::size_t occasion)
 
bool validateAfterNCounter (const char *filename, base::type::LineNumber lineNumber, std::size_t n)
 
bool validateNTimesCounter (const char *filename, base::type::LineNumber lineNumber, std::size_t n)
 
base::RegisteredHitCountershitCounters (void) const
 
base::RegisteredLoggersregisteredLoggers (void) const
 
base::VRegistryvRegistry (void) const
 
const base::utils::CommandLineArgscommandLineArgs (void) const
 
void addFlag (LoggingFlag flag)
 
void removeFlag (LoggingFlag flag)
 
bool hasFlag (LoggingFlag flag) const
 
base::type::EnumType flags (void) const
 
void setFlags (base::type::EnumType flags)
 
void setPreRollOutCallback (const PreRollOutCallback &callback)
 
void unsetPreRollOutCallback (void)
 
PreRollOutCallbackpreRollOutCallback (void)
 
bool hasCustomFormatSpecifier (const char *formatSpecifier)
 
void installCustomFormatSpecifier (const CustomFormatSpecifier &customFormatSpecifier)
 
bool uninstallCustomFormatSpecifier (const char *formatSpecifier)
 
const std::vector< CustomFormatSpecifier > * customFormatSpecifiers (void) const
 
base::threading::MutexcustomFormatSpecifiersLock ()
 
void setLoggingLevel (Level level)
 
template<typename T >
bool installLogDispatchCallback (const std::string &id)
 
template<typename T >
void uninstallLogDispatchCallback (const std::string &id)
 
template<typename T >
TlogDispatchCallback (const std::string &id)
 
void setThreadName (const std::string &name)
 Sets thread name for current thread. Requires std::thread. More...
 
std::string getThreadName (const std::string &threadId)
 
- 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
 

Static Public Member Functions

static el::base::type::StoragePointergetELPP ()
 

Friends

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

Additional Inherited Members

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

Detailed Description

Easylogging++ management storage.

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

Constructor & Destructor Documentation

◆ Storage()

el::base::Storage::Storage ( const LogBuilderPtr defaultLogBuilder)
explicit

◆ ~Storage()

virtual el::base::Storage::~Storage ( void  )
virtual

Member Function Documentation

◆ addFlag()

void el::base::Storage::addFlag ( LoggingFlag  flag)
inline

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

2641  {
2642  base::utils::addFlag(flag, &m_flags);
2643  }

◆ commandLineArgs()

const base::utils::CommandLineArgs* el::base::Storage::commandLineArgs ( void  ) const
inline

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

2637  {
2638  return &m_commandLineArgs;
2639  }

◆ customFormatSpecifiers()

const std::vector<CustomFormatSpecifier>* el::base::Storage::customFormatSpecifiers ( void  ) const
inline

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

2677  {
2678  return &m_customFormatSpecifiers;
2679  }

◆ customFormatSpecifiersLock()

base::threading::Mutex& el::base::Storage::customFormatSpecifiersLock ( )
inline

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

2681  {
2682  return m_customFormatSpecifiersLock;
2683  }

◆ flags()

base::type::EnumType el::base::Storage::flags ( void  ) const
inline

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

2653  {
2654  return m_flags;
2655  }
Here is the caller graph for this function:

◆ getELPP()

static el::base::type::StoragePointer& el::base::Storage::getELPP ( )
static

◆ getThreadName()

std::string el::base::Storage::getThreadName ( const std::string &  threadId)
inline

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

2729  {
2730  base::threading::ScopedLock scopedLock(m_threadNamesLock);
2731  std::unordered_map<std::string, std::string>::const_iterator it = m_threadNames.find(threadId);
2732  if (it == m_threadNames.end()) {
2733  return threadId;
2734  }
2735  return it->second;
2736  }
base::threading::internal::ScopedLock< base::threading::Mutex > ScopedLock

◆ hasCustomFormatSpecifier()

bool el::base::Storage::hasCustomFormatSpecifier ( const char *  formatSpecifier)

◆ hasFlag()

bool el::base::Storage::hasFlag ( LoggingFlag  flag) const
inline

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

2649  {
2650  return base::utils::hasFlag(flag, m_flags);
2651  }

◆ hitCounters()

base::RegisteredHitCounters* el::base::Storage::hitCounters ( void  ) const
inline

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

2619  {
2620  return m_registeredHitCounters;
2621  }
Here is the caller graph for this function:

◆ installCustomFormatSpecifier()

void el::base::Storage::installCustomFormatSpecifier ( const CustomFormatSpecifier customFormatSpecifier)

◆ installLogDispatchCallback()

template<typename T >
bool el::base::Storage::installLogDispatchCallback ( const std::string &  id)
inline

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

2690  {
2691  return base::utils::Utils::installCallback<T, base::type::LogDispatchCallbackPtr>(id, &m_logDispatchCallbacks);
2692  }

◆ logDispatchCallback()

template<typename T >
T* el::base::Storage::logDispatchCallback ( const std::string &  id)
inline

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

2699  {
2700  return base::utils::Utils::callback<T, base::type::LogDispatchCallbackPtr>(id, &m_logDispatchCallbacks);
2701  }

◆ preRollOutCallback()

PreRollOutCallback& el::base::Storage::preRollOutCallback ( void  )
inline

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

2669  {
2670  return m_preRollOutCallback;
2671  }

◆ registeredLoggers()

base::RegisteredLoggers* el::base::Storage::registeredLoggers ( void  ) const
inline

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

2623  {
2624  return m_registeredLoggers;
2625  }

◆ removeFlag()

void el::base::Storage::removeFlag ( LoggingFlag  flag)
inline

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

2645  {
2646  base::utils::removeFlag(flag, &m_flags);
2647  }

◆ setFlags()

void el::base::Storage::setFlags ( base::type::EnumType  flags)
inline

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

2657  {
2658  m_flags = flags;
2659  }
base::type::EnumType flags(void) const
Here is the call graph for this function:

◆ setLoggingLevel()

void el::base::Storage::setLoggingLevel ( Level  level)
inline

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

2685  {
2686  m_loggingLevel = level;
2687  }

◆ setPreRollOutCallback()

void el::base::Storage::setPreRollOutCallback ( const PreRollOutCallback callback)
inline

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

2661  {
2662  m_preRollOutCallback = callback;
2663  }

◆ setThreadName()

void el::base::Storage::setThreadName ( const std::string &  name)
inline

Sets thread name for current thread. Requires std::thread.

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

2723  {
2724  if (name.empty()) return;
2725  base::threading::ScopedLock scopedLock(m_threadNamesLock);
2726  m_threadNames[base::threading::getCurrentThreadId()] = name;
2727  }
const char * name
base::threading::internal::ScopedLock< base::threading::Mutex > ScopedLock

◆ uninstallCustomFormatSpecifier()

bool el::base::Storage::uninstallCustomFormatSpecifier ( const char *  formatSpecifier)

◆ uninstallLogDispatchCallback()

template<typename T >
void el::base::Storage::uninstallLogDispatchCallback ( const std::string &  id)
inline

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

2695  {
2696  base::utils::Utils::uninstallCallback<T, base::type::LogDispatchCallbackPtr>(id, &m_logDispatchCallbacks);
2697  }

◆ unsetPreRollOutCallback()

void el::base::Storage::unsetPreRollOutCallback ( void  )
inline

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

2665  {
2666  m_preRollOutCallback = base::defaultPreRollOutCallback;
2667  }

◆ validateAfterNCounter()

bool el::base::Storage::validateAfterNCounter ( const char *  filename,
base::type::LineNumber  lineNumber,
std::size_t  n 
)
inline

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

2611  {
2612  return hitCounters()->validateAfterN(filename, lineNumber, n);
2613  }
base::RegisteredHitCounters * hitCounters(void) const
bool validateAfterN(const char *filename, base::type::LineNumber lineNumber, std::size_t n)
Validates counter for hits >= N, i.e, registers new if does not exist otherwise updates original one...
Here is the call graph for this function:

◆ validateEveryNCounter()

bool el::base::Storage::validateEveryNCounter ( const char *  filename,
base::type::LineNumber  lineNumber,
std::size_t  occasion 
)
inline

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

2607  {
2608  return hitCounters()->validateEveryN(filename, lineNumber, occasion);
2609  }
base::RegisteredHitCounters * hitCounters(void) const
bool validateEveryN(const char *filename, base::type::LineNumber lineNumber, std::size_t n)
Validates counter for every N, i.e, registers new if does not exist otherwise updates original one...
Here is the call graph for this function:

◆ validateNTimesCounter()

bool el::base::Storage::validateNTimesCounter ( const char *  filename,
base::type::LineNumber  lineNumber,
std::size_t  n 
)
inline

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

2615  {
2616  return hitCounters()->validateNTimes(filename, lineNumber, n);
2617  }
base::RegisteredHitCounters * hitCounters(void) const
bool validateNTimes(const char *filename, base::type::LineNumber lineNumber, std::size_t n)
Validates counter for hits are <= n, i.e, registers new if does not exist otherwise updates original ...
Here is the call graph for this function:

◆ vRegistry()

base::VRegistry* el::base::Storage::vRegistry ( void  ) const
inline

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

2627  {
2628  return m_vRegistry;
2629  }

Friends And Related Function Documentation

◆ el::base::DefaultLogDispatchCallback

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

◆ el::base::LogDispatcher

friend class el::base::LogDispatcher
friend

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

◆ el::base::MessageBuilder

friend class el::base::MessageBuilder
friend

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

◆ el::base::PerformanceTracker

friend class el::base::PerformanceTracker
friend

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

◆ el::base::Writer

friend class el::base::Writer
friend

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

◆ el::Helpers

friend class el::Helpers
friend

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

◆ el::LogBuilder

friend class el::LogBuilder
friend

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


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