logger: -e option only logs until disarm, add -f option to log until shutdown

This commit is contained in:
Beat Küng
2016-05-14 11:27:07 +02:00
committed by Lorenz Meier
parent fc51f81bf5
commit fcf7e8b78c
2 changed files with 25 additions and 6 deletions
+3 -1
View File
@@ -74,7 +74,8 @@ struct LoggerSubscription {
class Logger
{
public:
Logger(size_t buffer_size, unsigned log_interval, bool log_on_start, bool log_name_timestamp);
Logger(size_t buffer_size, unsigned log_interval, bool log_on_start,
bool log_until_shutdown, bool log_name_timestamp);
~Logger();
@@ -165,6 +166,7 @@ private:
size_t _high_water = 0; ///< maximum used write buffer
const bool _log_on_start;
const bool _log_until_shutdown;
const bool _log_name_timestamp;
Array<LoggerSubscription, MAX_TOPICS_NUM> _subscriptions;
LogWriter _writer;