Commit 0fe4de3
committed
libutil: stdlog: allow non-ascii characters
Problem: As a preventative measure when log message contents
were wrapped into a JSON payload during log.dmesg responses, the
stdlog_encode() implementation clears all bits that are not valid ASCII
in log messages. This means, for example, that the F58 jobid prefix
is garbled in log messages, along with any other non-ASCII characters.
Since `log.dmesg` responses no longer use JSON, requiring ASCII-only
log message contents is not strictly necessary. Therefore, remove the
code that cleared non-ASCII bits.
Note: Technically, RFC 5424 requires that a BOM (byte order mask) be
placed before all known UTF-8 message content. However, the RFC does
allow conformant implementations to skip the BOM if the content is
not known to be UTF-8. Therefore, this implementation avoids encoding
the BOM on messages since it cannot know with certainty all messages
are valid UTF-8 without scanning every byte (which is not done).
The BOM would be unused in the implementation anyway, and currently
Flux log messages are not forwarded to other syslog implementations,
so there would be little gain in encoding this sentinel anyway.
Fixes #52501 parent 6bf876d commit 0fe4de3
1 file changed
+0
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
183 | | - | |
184 | | - | |
185 | 183 | | |
186 | 184 | | |
187 | 185 | | |
| |||
0 commit comments