[systemd-devel] StandardOutput to file
Marti Raudsepp
marti at juffo.org
Thu Mar 15 07:03:44 PDT 2012
2012/3/15 Martín Marqués <martin.marques at gmail.com>:
> I the old system, I had the script make a redirection of the pg_ctl
> (postgresql script for starting, stopping, etc the server) output to a
> file, which would be the log file (default behaviour in Debian).
If you're talking about catching errors from pg_ctl itself then that's
not possible (as described by Lennart and Kay). Note that these errors
are written to stderr, not stdout.
If you want to redirect logs from the server process then pg_ctl
provides the -l argument for this.
(Or better, you could set logging_collector=on, so PostgreSQL will
write to $PGDATA/pg_log and rotate log files itself)
Regards,
Marti
More information about the systemd-devel
mailing list