Skip site navigation (1) Skip section navigation (2)

logging issue

From: "Campbell, Lance" <lance(at)illinois(dot)edu>
To: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: logging issue
Date: 2012-03-06 21:04:23
Message-ID: B75CD08C73BD3543B97E4EF3964B7D701E3CF9AF@CITESMBX5.ad.uillinois.edu (view raw or flat)
Thread:
Lists: pgsql-admin
PostgreSQL 9.1.3

I just moved our test database from PostgreSQL 9.0 to 9.1.  I also changed my log settings.   I am seeing every single SQL statement that PostgreSQL performs by my Java applications.  Is there some way to only display the details when there is an error?  I would assume yes.  But for some reason I am getting all SQL statements.  I just want the errors.  I have included below my settings for the logging section.  Any help would be greatly appreciated.  Thanks!

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

# - Where to Log -

#log_destination = 'stderr'             # Valid values are combinations of

logging_collector = on          # Enable capturing of stderr and csvlog

#log_directory = 'pg_log'               # directory where log files are written,

log_filename = 'postgresql-9_1-%a.log'  # log file name pattern,

#log_file_mode = 0600                   # creation mode for log files,

log_truncate_on_rotation = on           # If on, an existing log file with the

#log_rotation_age = 1d                  # Automatic rotation of logfiles will

log_rotation_size = 50MB                # Automatic rotation of logfiles will

#syslog_facility = 'LOCAL0'
#syslog_ident = 'postgres'
#silent_mode = off                      # Run server silently.
#client_min_messages = notice           # values in order of decreasing detail:
#log_min_messages = warning             # values in order of decreasing detail:
#log_min_error_statement = error        # values in order of decreasing detail:
#log_min_duration_statement = -1        # -1 is disabled, 0 logs all statements

#debug_print_parse = off
#debug_print_rewritten = off
#debug_print_plan = off
#debug_pretty_print = on
#log_checkpoints = off
#log_connections = off
#log_disconnections = off
#log_duration = off
#log_error_verbosity = default          # terse, default, or verbose messages
#log_hostname = off

log_line_prefix = '%u::%t '                     # special values:

#log_lock_waits = off                   # log lock waits >= deadlock_timeout

log_statement = 'all'                   # none, ddl, mod, all

#log_temp_files = -1                    # log temporary files equal or larger
#log_timezone = '(defaults to server environment setting)'


Thanks,

Lance Campbell
Software Architect
Web Services at Public Affairs
217-333-0382


Responses

pgsql-admin by date

Next:From: Jerry SieversDate: 2012-03-06 21:43:01
Subject: Re: logging issue
Previous:From: Tom LaneDate: 2012-03-06 17:38:49
Subject: Re: I've got gaps in the log files?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group