We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b162fb6 commit 17549ebCopy full SHA for 17549eb
src/rosmod_actor/include/rosmod_actor/logger.hpp
@@ -133,13 +133,15 @@ class Logger
133
if (logs_to_file_) {
134
log_stream_ << log_content_;
135
log_stream_.flush();
136
- }
137
- else
+ } else {
138
printf("%s", log_content_.c_str());
+ }
139
+ log_content_ = "";
140
return true;
141
142
143
return false;
144
145
}
146
147
@@ -151,7 +153,6 @@ class Logger
151
153
std::lock_guard<std::recursive_mutex> lk(settings_mutex);
152
154
if (is_periodic_ && size() > max_log_unit_) {
155
write();
- log_content_ = "";
156
157
158
0 commit comments