On Wed, 14.03.12 20:54, Marti Raudsepp ([email protected]) wrote: > > Does PostgreSQL actually write those multi-line messages into syslog > > datagrams? interesting i must say, I didn't expect that people do that > > No, currently it sends a separate syslog message for each line. But I > wrote a PostgreSQL module to send messages directly to journal (since > there's a lot of useful context information that gets lost with > syslog) and was wondering how to handle multiline messages: > https://github.com/intgr/pg_journal/blob/master/doc/pg_journal.md
Ah, nice! That looks interesting! > > Also, we recently added functions to check utf8 validity of strings to > > systemd. > > Yeah, I took a stab at the message printing code and concluded that it > needs to be rewritten anyway if we want to handle non-ASCII messages > right: > * validating UTF-8 in messages (depending on locale) depending on locale? If something is UTF-8 it is UTF-8. Or are you referring to conversion to 8bit non-UTF-8 charsets for compatibility with non-UTF8 terminals? honestly, I can only recommend ignoring those. People who still run non-UTF8 locales deserve that things get broken for them. > * making sure that ellipsize doesn't corrupt multibyte UTF-8 chars > * expand tabs, as you pointed out > * double-width Unicode characters (e.g. み takes up two terminal columns) > * newline handling > > Maybe we should give up on ellipsize and just let 'less -S' do the > work. That would avoid a lot of complexity with width-counting. I think we already disable ellipsizing if we are piped into something, no? Lennart -- Lennart Poettering - Red Hat, Inc. _______________________________________________ systemd-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/systemd-devel
