8.3 Logging Question

From: "Chris Hoover" <revoohc(at)gmail(dot)com>
To: "pgsql-admin(at)postgresql(dot)org Admin" <pgsql-admin(at)postgresql(dot)org>
Subject: 8.3 Logging Question
Date: 2008-01-24 18:31:55
Message-ID: 1d219a6f0801241031p4faa7b3cr2260f97e76bc71e0@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

I'm running PG 8.3rc2 to start testing it out, and really like how it is
preforming for me so far. However, I have one question on the logging. I
am trying to use syslog and csvlog to log all sql. This seems to work great
except that for every log rotation postgres does, I get a .csv log file that
grows and a 0 byte .log file. Since I'm not logging to stderr, why is the
.log file being created, and how do I turn that off?

Thanks for your help,

Chris

Relevent config file portion:

#------------------------------------------------------------------------------
# ERROR REPORTING AND LOGGING
#------------------------------------------------------------------------------

# - Where to Log -

log_destination = 'syslog,csvlog' # Valid values are
combinations of
# stderr, csvlog, syslog and
eventlog,
# depending on platform. csvlog
# requires logging_collector to be
on.

# This is used when logging to stderr:
logging_collector = on # Enable capturing of stderr and
csvlog
# into log files. Required to be on
for
# csvlogs.
# (change requires restart)

# These are only used if logging_collector is on:
log_directory = 'pg_log' # directory where log files are
written,
# can be absolute or relative to
PGDATA
#log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log' # log file name
pattern,
# can include strftime() escapes
log_truncate_on_rotation = on # If on, an existing log file of the
# same name as the new log file will
be
# truncated rather than appended to.
# But such truncation only occurs on
# time-driven rotation, not on
restarts
# or size-driven rotation. Default
is
# off, meaning append to existing
files
# in all cases.
log_rotation_age = 1h # Automatic rotation of logfiles
will
# happen after that time. 0 to
disable.
log_rotation_size = 0 # Automatic rotation of logfiles
will
# happen after that much log output.
# 0 to disable.

# These are relevant when logging to syslog:
syslog_facility = 'LOCAL0'
syslog_ident = 'postgres'

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Dominic Carlucci 2008-01-24 19:08:26 Backup
Previous Message Tom Lane 2008-01-23 22:48:41 Re: lost /pg_xlog