Skip to content

Commit dd2a7e6

Browse files
committed
log: Clear log_modules after changing log spec
I was expecting to be able to change the logging of a running rr process by running `rr::apply_log_spec` at runtime under gdb, but this did not quite work, because unlike `set_all_logging`, it does not clear the log_modules cache. I think it would be useful for this to work, so clear log_modules at the end of this function.
1 parent 5cbdfed commit dd2a7e6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/log.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ void apply_log_spec(const char *spec) {
182182
}
183183
}
184184
free(env);
185+
log_modules->clear();
185186
}
186187

187188
void apply_log_spec_from_env() {

0 commit comments

Comments
 (0)