]> git.pld-linux.org Git - packages/pcsc-lite.git/commitdiff
- include pid in daemon logs, also log it to debug facility, not info
authorElan Ruusamäe <glen@pld-linux.org>
Wed, 12 Jan 2011 00:12:07 +0000 (00:12 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    debuglog-pid.patch -> 1.1
    pcsc-lite.spec -> 1.52

debuglog-pid.patch [new file with mode: 0644]
pcsc-lite.spec

diff --git a/debuglog-pid.patch b/debuglog-pid.patch
new file mode 100644 (file)
index 0000000..f681d95
--- /dev/null
@@ -0,0 +1,31 @@
+--- pcsc-lite-1.6.6/src/debuglog.c~    2010-06-30 15:40:58.000000000 +0300
++++ pcsc-lite-1.6.6/src/debuglog.c     2011-01-12 01:58:18.693291099 +0200
+@@ -104,6 +104,8 @@
+ {
+       char DebugBuffer[DEBUG_BUF_SIZE];
+       va_list argptr;
++      // boolean not to do openlog several times
++      static int syslog_opened = 0;
+       if ((LogSuppress != DEBUGLOG_LOG_ENTRIES)
+               || (priority < LogLevel) /* log priority lower than threshold? */
+@@ -114,13 +116,18 @@
+       vsnprintf(DebugBuffer, DEBUG_BUF_SIZE, fmt, argptr);
+       va_end(argptr);
++      if (DEBUGLOG_SYSLOG_DEBUG == LogMsgType && !syslog_opened) {
++              openlog(NULL, LOG_PID, LOG_DAEMON);
++              syslog_opened = 1;
++      }
++
+       log_line(priority, DebugBuffer);
+ } /* log_msg */
+ static void log_line(const int priority, const char *DebugBuffer)
+ {
+       if (DEBUGLOG_SYSLOG_DEBUG == LogMsgType)
+-              syslog(LOG_INFO, "%s", DebugBuffer);
++              syslog(LOG_DEBUG, "%s", DebugBuffer);
+       else
+       {
+               if (LogDoColor)
index 391710250c32328116929e0397ad35e06a973cf0..04da6a5b5ae80732d9319227c323a594c05309a9 100644 (file)
@@ -17,6 +17,7 @@ Source2:      %{name}-pcscd.sysconfig
 Patch0:                %{name}-fhs.patch
 Patch1:                %{name}-any.patch
 Patch2:                noautostart.patch
+Patch3:                debuglog-pid.patch
 URL:           http://www.linuxnet.com/middle.html
 BuildRequires: autoconf >= 2.58
 BuildRequires: automake >= 1:1.8
@@ -101,6 +102,7 @@ Dokumentacja API biblioteki PC/SC Lite.
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
 
 %build
 %{__libtoolize}
This page took 0.26089 seconds and 4 git commands to generate.