[Spice-devel] [PATCH spice-streaming-agent v3 2/4] Enable line buffering instead of full buffering for the log
Frediano Ziglio
fziglio at redhat.com
Wed May 23 09:01:52 UTC 2018
Allows to kill the process without losing log lines
Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
src/spice-streaming-agent.cpp | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/spice-streaming-agent.cpp b/src/spice-streaming-agent.cpp
index b30e968..d4c4707 100644
--- a/src/spice-streaming-agent.cpp
+++ b/src/spice-streaming-agent.cpp
@@ -489,6 +489,9 @@ int main(int argc, char* argv[])
log_filename, strerror(errno));
return EXIT_FAILURE;
}
+ if (!log_binary) {
+ setlinebuf(f_log);
+ }
for (const std::string& arg: old_args) {
STAT_LOG("Args: %s", arg.c_str());
}
--
2.17.0
More information about the Spice-devel
mailing list