aboutsummaryrefslogtreecommitdiff
path: root/error.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--error.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/error.c b/error.c
index 01a6207..f01dd8f 100644
--- a/error.c
+++ b/error.c
@@ -300,26 +300,29 @@ void x_msg (const unsigned int flags, const char *format, ...)
if ((flags & M_NOPREFIX) || suppress_timestamps)
{
- fprintf (fp, "%s%s%s\n",
+ fprintf (fp, "%s%s%s%s",
prefix,
prefix_sep,
- m1);
+ m1,
+ (flags&M_NOLF) ? "" : "\n");
}
else
{
#ifdef USE_PTHREAD
- fprintf (fp, "%s [%d] %s%s%s\n",
+ fprintf (fp, "%s [%d] %s%s%s%s",
time_string (0, 0, show_usec, &gc),
(int) openvpn_thread_self (),
prefix,
prefix_sep,
- m1);
+ m1,
+ (flags&M_NOLF) ? "" : "\n");
#else
- fprintf (fp, "%s %s%s%s\n",
+ fprintf (fp, "%s %s%s%s%s",
time_string (0, 0, show_usec, &gc),
prefix,
prefix_sep,
- m1);
+ m1,
+ (flags&M_NOLF) ? "" : "\n");
#endif
}
fflush(fp);