Class that keeps record of current line hit for occasional logging.
More...
#include <easylogging++.h>
Class that keeps record of current line hit for occasional logging.
Definition at line 2055 of file easylogging++.h.
◆ HitCounter() [1/3]
| el::base::HitCounter::HitCounter |
( |
void | | ) |
|
|
inline |
Definition at line 2057 of file easylogging++.h.
2057 :
2058 m_filename(""),
2059 m_lineNumber(0),
2060 m_hitCounts(0) {
2061 }
◆ HitCounter() [2/3]
Definition at line 2063 of file easylogging++.h.
2063 :
2066 m_hitCounts(0) {
2067 }
base::type::LineNumber lineNumber(void) const
const char * filename(void) const
◆ HitCounter() [3/3]
| el::base::HitCounter::HitCounter |
( |
const HitCounter & | hitCounter | ) |
|
|
inline |
Definition at line 2069 of file easylogging++.h.
2069 :
2070 m_filename(hitCounter.m_filename),
2071 m_lineNumber(hitCounter.m_lineNumber),
2072 m_hitCounts(hitCounter.m_hitCounts) {
2073 }
◆ ~HitCounter()
| virtual el::base::HitCounter::~HitCounter |
( |
void | | ) |
|
|
inlinevirtual |
◆ filename()
| const char * el::base::HitCounter::filename |
( |
void | | ) |
const |
|
inline |
◆ hitCounts()
| std::size_t el::base::HitCounter::hitCounts |
( |
void | | ) |
const |
|
inline |
◆ increment()
| void el::base::HitCounter::increment |
( |
void | | ) |
|
|
inline |
◆ lineNumber()
◆ operator=()
Definition at line 2075 of file easylogging++.h.
2075 {
2076 if (&hitCounter != this) {
2077 m_filename = hitCounter.m_filename;
2078 m_lineNumber = hitCounter.m_lineNumber;
2079 m_hitCounts = hitCounter.m_hitCounts;
2080 }
2081 return *this;
2082 }
◆ resetLocation()
◆ validateHitCounts()
| void el::base::HitCounter::validateHitCounts |
( |
std::size_t | n | ) |
|
|
inline |
Validates hit counts and resets it if necessary.
Definition at line 2094 of file easylogging++.h.
2094 {
2095 if (m_hitCounts >= base::consts::kMaxLogPerCounter) {
2096 m_hitCounts = (n >= 1 ? base::consts::kMaxLogPerCounter % n : 0);
2097 }
2098 ++m_hitCounts;
2099 }
The documentation for this class was generated from the following file:
- /home/abuild/rpmbuild/BUILD/electroneum-5.1.3.1-build/electroneum-5.1.3.1/external/easylogging++/easylogging++.h