|
Thunderbots Project
|
#include <log_merger.h>
Public Member Functions | |
| LogMerger (bool enable_merging=true) | |
| std::list< g3::LogMessage > | log (g3::LogMessage &log) |
| void | pastime () |
| g3::LogMessage | _addRepeats (g3::LogMessage &log, int repeats) |
| std::list< g3::LogMessage > | _getOldMessages (std::chrono::_V2::system_clock::time_point current_time) |
Public Attributes | |
| const std::chrono::_V2::system_clock::duration | LOG_MERGE_DURATION |
Handles merging repeated log messages into a single message
|
explicit |
Creates a merger to hold repeated log messages
| enable_merging | Whether to merge logs or not |
| g3::LogMessage _addRepeats | ( | g3::LogMessage & | log, |
| int | repeats | ||
| ) |
Add number of repeats to a log
| std::list< g3::LogMessage > _getOldMessages | ( | std::chrono::_V2::system_clock::time_point | current_time | ) |
Looks through the message list for expired messages, removes them from the list and map, and returns them as strings
| std::list< g3::LogMessage > log | ( | g3::LogMessage & | log | ) |
Returns a list of all logs that should be logged at the current time, starting with the given log (if it isn't a repeat)
| msg | The LogMessage to be logged |
| void pastime | ( | ) |
Adds LOG_MERGE_DURATION amount of time to the merger's currently tracked time. Used for testing
| const std::chrono::_V2::system_clock::duration LOG_MERGE_DURATION |