Re: Syslog and pg_options (for RPMs)
От | ncm@zembu.com (Nathan Myers) |
---|---|
Тема | Re: Syslog and pg_options (for RPMs) |
Дата | |
Msg-id | 20010208141028.X624@store.zembu.com обсуждение исходный текст |
Ответ на | Re: Syslog and pg_options (for RPMs) (Lamar Owen <lamar.owen@wgcr.org>) |
Ответы |
Re: Syslog and pg_options (for RPMs)
|
Список | pgsql-hackers |
On Thu, Feb 08, 2001 at 04:00:12PM -0500, Lamar Owen wrote: > "Dominic J. Eidson" wrote: > > On Thu, 8 Feb 2001, Lamar Owen wrote: > > > A syslogger of stderr would make a nice place to pipe the output :-). > > > 'postmaster .... 2>&1 | output-to-syslog-program -f facility.desired' or > > > 2>&1 | logger -p facility.level > [snip] > > Logger provides a shell command interface to the syslog(3) system log > > module. > > Good. POSIX required, and part of the base system (basically, guaranteed > to be there on any Linux box). Thanks for the pointer. Not so fast... logger just writes its arguments to syslog. I don't see any indication that it (portably) reads its standard input. It's meant for use in shellscripts. You could write: ... 2>&1 | while read i; do logger -p local1.warning -t 'PG ' -- "$i"; done but syslog is pretty high-overhead already without starting up logger on every message. Maybe stderr messages are infrequent enough that it doesn't matter. Nathan Myers ncm@zembu.com
В списке pgsql-hackers по дате отправления: