* systemd-support: log to stderr in non-daemon mode to ensure log entries are pushed to journal right away (stdout is buffered)

This commit is contained in:
luuloe 2017-11-02 11:45:52 +00:00
parent bcc355c6be
commit 3e7fefc926
2 changed files with 3 additions and 3 deletions

View File

@ -192,8 +192,8 @@ CTAGS = ctags
CSCOPE = cscope
DIST_SUBDIRS = $(SUBDIRS)
am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in compile \
config.guess config.sub install-sh ltconfig ltmain.sh missing \
mkinstalldirs
config.guess config.sub depcomp install-sh ltconfig ltmain.sh \
missing mkinstalldirs
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)

View File

@ -114,7 +114,7 @@ logw(int level, char *fmt, ...)
strsize += vsnprintf(p, INTBUFSIZE - strsize, fmt, args);
va_end(args);
strcpy(str + strsize++, "\n");
if (!isdaemon) printf("%s", str);
if (!isdaemon) fprintf(stderr, "%s", str);
if (*logfullname == '\0') return;
log_app(logfullname, str);
}