Write Sunshine log output to disk and hide the window
This commit is contained in:
parent
d15c1af152
commit
b4255e22aa
2 changed files with 37 additions and 6 deletions
|
|
@ -185,6 +185,10 @@ int main(int argc, char *argv[]) {
|
|||
os << _date << log_type << view.attribute_values()[message].extract<std::string>();
|
||||
});
|
||||
|
||||
// Flush after each log record to ensure log file contents on disk isn't stale.
|
||||
// This is particularly important when running from a Windows service.
|
||||
sink->locked_backend()->auto_flush(true);
|
||||
|
||||
bl::core::get()->add_sink(sink);
|
||||
auto fg = util::fail_guard(log_flush);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue