mirror of
https://github.com/outbackdingo/UltraGrid.git
synced 2026-03-21 09:40:18 +00:00
logging: reset style only on tty
This commit is contained in:
@@ -130,7 +130,8 @@ void log_msg(int level, const char *format, ...)
|
||||
}
|
||||
va_end(ap);
|
||||
|
||||
buf.append(TERM_RESET);
|
||||
if(get_log_output().is_interactive())
|
||||
buf.append(TERM_RESET);
|
||||
buf.submit();
|
||||
}
|
||||
|
||||
|
||||
@@ -154,6 +154,7 @@ public:
|
||||
void set_timestamp_mode(log_timestamp_mode val) { show_timestamps = val; }
|
||||
|
||||
const std::string& get_level_style(int lvl);
|
||||
bool is_interactive() const { return interactive; }
|
||||
|
||||
Log_output(const Log_output&) = delete;
|
||||
Log_output(Log_output&&) = delete;
|
||||
|
||||
Reference in New Issue
Block a user