projects
/
project
/
ubox.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
RFC 3164 compliant remote logging
[project/ubox.git]
/
log
/
logread.c
diff --git
a/log/logread.c
b/log/logread.c
index 28c9462904e69e07ae1649fa6ae9658567d320b6..a7ab567a9fa0bbd0f6c4b8072f7e35b9128d332c 100644
(file)
--- a/
log/logread.c
+++ b/
log/logread.c
@@
-135,9
+135,12
@@
static int log_notify(struct blob_attr *msg)
if (log_type == LOG_NET) {
int err;
if (log_type == LOG_NET) {
int err;
- *buf = '\0';
- if (hostname)
- snprintf(buf, sizeof(buf), "%s ", hostname);
+ snprintf(buf, sizeof(buf), "<%u>", p);
+ strncat(buf, c + 4, 16);
+ if (hostname) {
+ strncat(buf, hostname, sizeof(buf));
+ strncat(buf, " ", sizeof(buf));
+ }
if (log_prefix) {
strncat(buf, log_prefix, sizeof(buf));
strncat(buf, ": ", sizeof(buf));
if (log_prefix) {
strncat(buf, log_prefix, sizeof(buf));
strncat(buf, ": ", sizeof(buf));