Print error message if read_queued_entry_from_dev returns RQER_PARSE 19/57319/3 accepted/tizen/mobile/20160122.030307 accepted/tizen/tv/20160122.030322 accepted/tizen/wearable/20160122.030346 submit/tizen/20160119.091144
authorKichan Kwon <k_c.kwon@samsung.com>
Tue, 19 Jan 2016 02:45:16 +0000 (11:45 +0900)
committerKichan Kwon <k_c.kwon@samsung.com>
Tue, 19 Jan 2016 09:09:36 +0000 (18:09 +0900)
RQER_PARSE is returned when read log has different format with the current backend's.

In current, log format is well converted though the backend is changed.

However, to debug easily, this code is remained.

Change-Id: Ie0055932065054129d0976a31c74cfb1ffec0d08
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
src/logger/logger.c
src/logutil/logutil.c

index 17421bf..40b2ce1 100755 (executable)
@@ -263,8 +263,13 @@ static void do_logger(struct log_device *dev)
                                        goto next;
                                else if (ret == RQER_EAGAIN)
                                        break;
-                               else if (ret == RQER_PARSE
-                                     || ret == RQER_EPIPE) // EPIPE is not an error: it signals the cyclic buffer having made a full turn and overwritten previous data
+                               else if (ret == RQER_PARSE) {
+                                       printf("Wrong formatted message is written. \n");
+                                       continue;
+                               }
+                               /* EPIPE is not an error: it signals the cyclic buffer 
+                                * having made a full turn and overwritten previous data */
+                               else if(ret == RQER_EPIPE)
                                        continue;
 
                                enqueue(&pdev->queue, entry);
index a87bd32..ae041ba 100755 (executable)
@@ -197,12 +197,12 @@ static void read_log_lines(struct log_device_t* devices)
                                                goto next;
                                        else if (ret == RQER_EAGAIN)
                                                break;
-                                       else if(ret == RQER_PARSE)
-                                       {
+                                       else if(ret == RQER_PARSE) {
                                                printf("Wrong formatted message is written.\n");
                                                continue;
                                        }
-                                       // EPIPE is not an error: it signals the cyclic buffer having made a full turn and overwritten previous data
+                                       /* EPIPE is not an error: it signals the cyclic buffer having
+                                        * made a full turn and overwritten previous data */
                                        else if(ret == RQER_EPIPE)
                                                continue;