Hi Andris,

thanks for the patch. However, the SMLERRPRINTFX() macro, like all debug output 
macros across the entire library, is supposed to output a linefeed by itself. 
It also actually does so in my builds of libsynthesis, so if the LFs are 
missing in your output, it must be something along the path from 
SMLERRPRINTFX() to the actual output function.

I think the problem is in the CONSOLEINFO_LIBC shortcut output mode Patrick 
added this February (13ff1e4149 (logging + Linux: enable console output)), 
where CONSOLEPRINTF() is mapped to fprintf(stderr,...) without adding a LF. In 
my (iOS) build this new mode is not used, but output ends in a plain puts(), 
which does add the LF.

So my suggestion would be this:

diff --git a/src/sysync/sysync_debug.h b/src/sysync/sysync_debug.h
index 61d4cdd..68dce5e 100755
--- a/src/sysync/sysync_debug.h
+++ b/src/sysync/sysync_debug.h
@@ -110,7 +110,7 @@ TDebugLogger *getDbgLogger(void);
   // Because a lot of libs log to stderr, include a unique prefix.
   // Assumes that all printf format strings are plain strings.
   #define CONSOLEPUTS(m) CONSOLE_PRINTF_VARARGS("%s", (m))
-#define CONSOLE_PRINTF_VARARGS(_m, _args...) fprintf(stderr, "SYSYNC " _m, 
##_args)
+#define CONSOLE_PRINTF_VARARGS(_m, _args...) fprintf(stderr, "SYSYNC " _m 
"\n", ##_args)
   #define CONSOLEPRINTF(m) CONSOLE_PRINTF_VARARGS m
 # else // CONSOLEINFO_LIBC
   #define CONSOLEPUTS(m) ConsolePuts(m)

Can you please check if this solves the problem in your build?


Lukas



On 05.06.2012, at 14:41, Andris Pavenis wrote:

> Patch attached.
> 
> Andris
> 
> <0001-Improve-output-of-SyncML-TK-error-messages.patch>_______________________________________________
> os-libsynthesis mailing list
> os-libsynthesis@synthesis.ch
> http://lists.synthesis.ch/mailman/listinfo/os-libsynthesis


_______________________________________________
os-libsynthesis mailing list
os-libsynthesis@synthesis.ch
http://lists.synthesis.ch/mailman/listinfo/os-libsynthesis

Reply via email to