Q: logger: "invalid structured data parameter: 'fo\o="b\"a\"r"'"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi!

If I understand it corrctly the logger from
util-linux-systemd-2.33.2-4.18.1.x86_64 of SLES12 is part of systemd; if not,
then please ignore.

I'm testing my implementation of RFC5424 syslog daemon, and I tried this
command:

logger -d --id --msgid=test1 -n 127.0.0.1 --port 10514 \
--rfc5424 --sd-id=test1-id@32473 --sd-param 'fo\o="b\"a\"r"' \
--sd-param 'jack="jill"' -t test-tag -p user.notice "${1:-test message}"

While --sd-param 'fo\o="bar"' worked, --sd-param 'fo\o="b\"a\"r"' does not.
Instead I get the message:
logger: invalid structured data parameter: 'fo\o="b\"a\"r"'

RFC 5424 states on page 16 (6.3.3 SD-PARAM):
   Inside PARAM-VALUE, the characters ’"’ (ABNF %d34), ’\’ (ABNF %d92),
   and ’]’ (ABNF %d93) MUST be escaped.  This is necessary to avoid
   parsing errors.

So my interpretation is that when " must be escaped, it's allowed to use \".

Am I wrong?

Regards,
Ulrich





[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux