[PATCH spice-streaming-agent v3 6/6] Remove unnecessary '\n' in syslog calls

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Lukáš Hrázký <lhrazky@xxxxxxxxxx>
---
 src/mjpeg-fallback.cpp        |  2 +-
 src/spice-streaming-agent.cpp | 16 ++++++++--------
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/mjpeg-fallback.cpp b/src/mjpeg-fallback.cpp
index b64762c..08353f2 100644
--- a/src/mjpeg-fallback.cpp
+++ b/src/mjpeg-fallback.cpp
@@ -185,7 +185,7 @@ bool MjpegPlugin::Register(Agent* agent)
     try {
         plugin->ParseOptions(agent->Options());
     } catch (const std::exception &e) {
-        syslog(LOG_ERR, "Error parsing plugin option: %s\n", e.what());
+        syslog(LOG_ERR, "Error parsing plugin option: %s", e.what());
     }
 
     agent->Register(*plugin.release());
diff --git a/src/spice-streaming-agent.cpp b/src/spice-streaming-agent.cpp
index 2eb0a9e..4103720 100644
--- a/src/spice-streaming-agent.cpp
+++ b/src/spice-streaming-agent.cpp
@@ -88,7 +88,7 @@ static void handle_stream_start_stop(StreamPort &stream_port, uint32_t len)
 
     stream_port.read(msg, len);
     streaming_requested = (msg[0] != 0); /* num_codecs */
-    syslog(LOG_INFO, "GOT START_STOP message -- request to %s streaming\n",
+    syslog(LOG_INFO, "GOT START_STOP message -- request to %s streaming",
            streaming_requested ? "START" : "STOP");
     client_codecs.clear();
     for (int i = 1; i <= msg[0]; ++i) {
@@ -133,7 +133,7 @@ static void handle_stream_error(StreamPort &stream_port, size_t len)
     stream_port.read(&msg, len_to_read);
     msg.msg[len_to_read - sizeof(StreamMsgNotifyError)] = '\0';
 
-    syslog(LOG_ERR, "Received NotifyError message from the server: %d - %s\n",
+    syslog(LOG_ERR, "Received NotifyError message from the server: %d - %s",
         msg.error_code, msg.msg);
 
     if (len_to_read < len) {
@@ -195,7 +195,7 @@ static void spice_stream_send_format(StreamPort &stream_port, unsigned w, unsign
     msg.msg.height = h;
     msg.msg.codec = c;
 
-    syslog(LOG_DEBUG, "writing format\n");
+    syslog(LOG_DEBUG, "writing format");
     std::lock_guard<std::mutex> guard(stream_port.mutex);
     stream_port.write(&msg, msgsize);
 }
@@ -214,7 +214,7 @@ static void spice_stream_send_frame(StreamPort &stream_port, const void *buf, co
     stream_port.write(&msg, msgsize);
     stream_port.write(buf, size);
 
-    syslog(LOG_DEBUG, "Sent a frame of size %u\n", size);
+    syslog(LOG_DEBUG, "Sent a frame of size %u", size);
 }
 
 static void handle_interrupt(int intr)
@@ -264,7 +264,7 @@ do_capture(StreamPort &stream_port, FrameLog &frame_log)
             return;
         }
 
-        syslog(LOG_INFO, "streaming starts now\n");
+        syslog(LOG_INFO, "streaming starts now");
         uint64_t time_last = 0;
 
         std::unique_ptr<FrameCapture> capture(agent.GetBestFrameCapture(client_codecs));
@@ -274,7 +274,7 @@ do_capture(StreamPort &stream_port, FrameLog &frame_log)
 
         while (!quit_requested && streaming_requested) {
             if (++frame_count % 100 == 0) {
-                syslog(LOG_DEBUG, "SENT %d frames\n", frame_count);
+                syslog(LOG_DEBUG, "SENT %d frames", frame_count);
             }
             uint64_t time_before = FrameLog::get_time();
 
@@ -299,7 +299,7 @@ do_capture(StreamPort &stream_port, FrameLog &frame_log)
                 height = frame.size.height;
                 codec = capture->VideoCodecType();
 
-                syslog(LOG_DEBUG, "wXh %uX%u  codec=%u\n", width, height, codec);
+                syslog(LOG_DEBUG, "wXh %uX%u  codec=%u", width, height, codec);
                 frame_log.log_stat("Started new stream wXh %uX%u codec=%u", width, height, codec);
 
                 spice_stream_send_format(stream_port, width, height, codec);
@@ -416,7 +416,7 @@ int main(int argc, char* argv[])
         do_capture(stream_port, frame_log);
     }
     catch (std::exception &err) {
-        syslog(LOG_ERR, "%s\n", err.what());
+        syslog(LOG_ERR, "%s", err.what());
         return EXIT_FAILURE;
     }
 
-- 
2.17.1

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux Virtualization]     [Linux Virtualization]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]