From: | ncm(at)zembu(dot)com (Nathan Myers) |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Syslog and pg_options (for RPMs) |
Date: | 2001-02-08 22:10:28 |
Message-ID: | 20010208141028.X624@store.zembu.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)zembu(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | The Hermit Hacker | 2001-02-08 22:35:22 | Re: [GENERAL] Re: full text searching |
Previous Message | Nathan Myers | 2001-02-08 21:57:31 | Re: Syslog and pg_options (for RPMs) |