pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Chris Hoover <revoohc@gmail.com>
To: pgsql-admin@postgresql.org Admin <pgsql-admin@postgresql.org>
Subject: 8.3 Logging Question
Date: Thu, 24 Jan 2008 13:31:55 -0500
Message-ID: <1d219a6f0801241031p4faa7b3cr2260f97e76bc71e0@mail.gmail.com> (raw)

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'

view thread (6+ messages)  latest in thread

Message-ID: <1d219a6f0801241031p4faa7b3cr2260f97e76bc71e0@mail.gmail.com>
Permalink:  ../1d219a6f0801241031p4faa7b3cr2260f97e76bc71e0@mail.gmail.com/
Also on:    postgresql.org/message-id/1d219a6f0801241031p4faa7b3cr2260f97e76bc71e0@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: revoohc@gmail.com
  Subject: Re: 8.3 Logging Question
  In-Reply-To: <1d219a6f0801241031p4faa7b3cr2260f97e76bc71e0@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox