mirror of
https://github.com/jorisvink/kore
synced 2025-03-09 20:49:01 -04:00
Always use logfile when set, even if !foreground.
This commit is contained in:
parent
4b4767ac39
commit
77848e0708
@ -92,7 +92,7 @@ kore_log(int prio, const char *fmt, ...)
|
|||||||
} else {
|
} else {
|
||||||
str = kore_buf_stringify(&buf, NULL);
|
str = kore_buf_stringify(&buf, NULL);
|
||||||
|
|
||||||
if (kore_foreground)
|
if (kore_foreground || fp != stdout)
|
||||||
log_print(prio, "[parent]: %s\n", str);
|
log_print(prio, "[parent]: %s\n", str);
|
||||||
else
|
else
|
||||||
syslog(prio, "[parent]: %s", str);
|
syslog(prio, "[parent]: %s", str);
|
||||||
@ -117,7 +117,7 @@ log_from_worker(struct kore_msg *msg, const void *data)
|
|||||||
wlog = data;
|
wlog = data;
|
||||||
name = kore_worker_name(wlog->wid);
|
name = kore_worker_name(wlog->wid);
|
||||||
|
|
||||||
if (kore_foreground) {
|
if (kore_foreground || fp != stdout) {
|
||||||
log_print(wlog->prio, "%s: %.*s\n",
|
log_print(wlog->prio, "%s: %.*s\n",
|
||||||
name, (int)wlog->loglen, wlog->logmsg);
|
name, (int)wlog->loglen, wlog->logmsg);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user