Re: logging stuff

Поиск
Список
Период
Сортировка
От Mendola Gaetano
Тема Re: logging stuff
Дата
Msg-id 005301c35ba5$d43b8db0$10d4a8c0@mm.eutelsat.org
обсуждение исходный текст
Ответ на logging stuff  (Andrew Dunstan <andrew@dunslane.net>)
Ответы Re: logging stuff  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
"Tom Lane" <tgl@sss.pgh.pa.us> writes:
> Josh Berkus <josh@agliodbs.com> writes:
> > From my perspective, we could really use a "delimiter" between the
> > "fields" of log output which is unlikely to appear within those fields
> > instead of parsing by character count, rather than making dbname a
> > special case.
>
> Well, Andrew was arguing that space is a likely character in dbnames,
> but then again it's possible to put "]" into dbnames.  I think the only
> way to make this completely unambiguous would be to introduce a quoting
> convention for dbnames (and usernames when those get added).  But if
> the goal is to allow simple parsing of log entries, that won't improve
> matters at all.
>
> My feeling about it is that DBAs who want to automatically parse log
> entries can just forbid spaces in the dbnames and usernames they allow.
> The KISS principle applies here.
>
> A variant (which'd be okay with me) is to separate these fields with
> tabs instead of spaces; then the rule for DBAs would be "don't allow
> tabs in db/user names".

The tabs are not properly treated by syslogd, look this piece of log:

Aug  6 01:02:16 dell-01 postgres[19490]: [157296] LOG:  connection received:
host=[local]
Aug  6 01:02:16 dell-01 postgres[19490]: [157297] LOG:  connection
authorized: user=kalman database=kalman
Aug  6 01:02:16 dell-01 postgres[19490]: [157298] DEBUG:
/usr/bin/postmaster child[19490]: starting with (
Aug  6 01:02:16 dell-01 postgres[19490]: [157299] DEBUG:  ^Ipostgres
Aug  6 01:02:16 dell-01 postgres[19490]: [157300] DEBUG:  ^I-v131072
Aug  6 01:02:16 dell-01 postgres[19490]: [157301] DEBUG:  ^I-p
Aug  6 01:02:16 dell-01 postgres[19490]: [157302] DEBUG:  ^Ikalman
Aug  6 01:02:16 dell-01 postgres[19490]: [157303] DEBUG:  )


do you see:   ^I   that are "chars" that syslogd hate.


Regards
Gaeatano Mendola




В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Adjustment of spinlock sleep delays
Следующее
От: Tom Lane
Дата:
Сообщение: Re: logging stuff