[PATCH] plymouth: Add line numbers to tracing output

Cristian Rodríguez crrodriguez at opensuse.org
Sun Apr 14 21:27:16 PDT 2013


From: Jeff Mahoney <jeffm at suse.com>

 The plymouth tracing output lists the function but there are many
 cases in which the same message is issued from multiple places in the same
 function, which makes debugging more difficult. This patch adds the line
 number to the output to uniquely identify each site.

Signed-off-by: Jeff Mahoney <jeffm at suse.com>
Signed-off-by: Cristian Rodríguez <crrodriguez at opensuse.org>
---
 src/libply/ply-logger.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/libply/ply-logger.h b/src/libply/ply-logger.h
index 36fe7d1..596bed5 100644
--- a/src/libply/ply-logger.h
+++ b/src/libply/ply-logger.h
@@ -91,8 +91,8 @@ do                                                                             \
         ply_logger_flush (logger);                                             \
         errno = _old_errno;                                                    \
         ply_logger_inject (logger,                                             \
-                           "[%s] %45.45s:" format "\r\n",                      \
-                           __FILE__, __func__, ##args);                        \
+                           "[%s:%d] %45.45s:" format "\r\n",                   \
+                           __FILE__, __LINE__, __func__, ##args);              \
         ply_logger_flush (logger);                                             \
         errno = _old_errno;                                                    \
       }                                                                        \
-- 
1.8.1.4



More information about the plymouth mailing list