Topic: log-printf.c patch proposal

Hello,

Is it possible to apply such very small patch to log-printf.c in source tree ?

This patch redirects debug to stderr instead of stdout.
This is usually recomended way to display debug messages.
It allows to redirect (it not needed) debug messages to other stream (/dev/null,file), and distinguish them from normal part of program messages.

I noticed that when working with libnfc sometimes I don't need debug (2>dev/null) , sometimes I need those messages. This small fix solve this problem.

Please find my patch proposal below.

================
--- libnfc-1.6.0-rc1/libnfc/log-printf.c    2012-03-01 16:02:42.000000000 +0100
+++ libnfc-1.6.0-rc1-0.1/libnfc/log-printf.c    2012-04-13 20:55:11.797487320 +0200
@@ -60,8 +60,9 @@
{
   va_list va;
   va_start (va, format);
-  printf ("%s\t%s\t", priority, category);
-  vprintf (format, va);
-  printf ("\n");
+  //printf ("%s\t%s\t", priority, category);
+  fprintf (stderr,"%s\t%s\t", priority, category);
+  vfprintf (stderr,format, va);
+  fprintf (stderr,"\n");
   va_end (va);
}
====================

Thanks for great piece of software :)

Re: log-printf.c patch proposal

Hello,

That's done in r1331.

Thanks!

Romuald Conty