pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Why both?: /var/log/messages AND /var/log/pgsql.
3+ messages / 2 participants
[nested] [flat]

* Why both?: /var/log/messages AND /var/log/pgsql.
@ 2003-11-29 10:48  ow <oneway_111@yahoo.com>
  0 siblings, 1 reply; 3+ messages in thread

From: ow @ 2003-11-29 10:48 UTC (permalink / raw)
  To: pgsql-admin

pgSql 7.4.0 on RH7.3

Hi,

It appears that pgSql somehow logs messages to BOTH /var/log/messages and
/var/log/pgsql. I expected that it would only log to /var/log/pgsql.

Any ideas? Thanks

-----------------------------------------------------------------
/etc/syslog.conf
# Save postgresql logs
local0.*                                                /var/log/pgsql

-----------------------------------------------------------------
/var/lib/pgsql/data/postgresql.conf

# - Syslog -

#syslog = 0                     # range 0-2; 0=stdout; 1=both; 2=syslog
syslog = 2                      # range 0-2; 0=stdout; 1=both; 2=syslog
#syslog_facility = 'LOCAL0'
#syslog_ident = 'postgres'

# - When to Log -

#client_min_messages = notice   # Values, in order of decreasing detail:
                                #   debug5, debug4, debug3, debug2, debug1,
                                #   log, info, notice, warning, error

#log_min_messages = notice      # Values, in order of decreasing detail:
                                #   debug5, debug4, debug3, debug2, debug1,
                                #   info, notice, warning, error, log, fatal,
                                #   panic

#log_error_verbosity = default   # terse, default, or verbose messages

#log_min_error_statement = panic # Values in order of increasing severity:
                                 #   debug5, debug4, debug3, debug2, debug1,
                                 #   info, notice, warning, error, panic(off)
                                 
#log_min_duration_statement = -1 # Log all statements whose
                                 # execution time exceeds the value, in
                                 # milliseconds.  Zero prints all queries.
                                 # Minus-one disables.

#silent_mode = false             # DO NOT USE without Syslog!

# - What to Log -

#debug_print_parse = false
#debug_print_rewritten = false
#debug_print_plan = false
#debug_pretty_print = false
#log_connections = false
log_connections = true
#log_duration = false
log_duration = true
#log_pid = false
log_pid = false
#log_statement = false
log_statement = true
#log_timestamp = false
log_timestamp = true
#log_hostname = false
log_hostname = true
#log_source_port = false
log_source_port = true





__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Why both?: /var/log/messages AND /var/log/pgsql.
@ 2003-11-29 13:32  ow <oneway_111@yahoo.com>
  parent: ow <oneway_111@yahoo.com>
  0 siblings, 1 reply; 3+ messages in thread

From: ow @ 2003-11-29 13:32 UTC (permalink / raw)
  To: pgsql-admin


--- ow <oneway_111@yahoo.com> wrote:
> pgSql 7.4.0 on RH7.3
> 
> Hi,
> 
> It appears that pgSql somehow logs messages to BOTH /var/log/messages and
> /var/log/pgsql. I expected that it would only log to /var/log/pgsql.
> 

It appears I forgot to add local0.none on the /var/log/messages line in
/etc/syslog.conf. Once added it logs only to /var/log/pgsql.

Strange though ... when I changed "local0" to "pgsql" in /etc/syslog.conf and
/var/lib/pgsql/data/postgresql.conf the logging stopped completely. Works with
local0 though. Anyhow

Thanks







__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Why both?: /var/log/messages AND /var/log/pgsql.
@ 2003-11-29 17:56  Oliver Elphick <olly@lfix.co.uk>
  parent: ow <oneway_111@yahoo.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Oliver Elphick @ 2003-11-29 17:56 UTC (permalink / raw)
  To: ow <oneway_111@yahoo.com>; +Cc: pgsql-admin

On Sat, 2003-11-29 at 13:32, ow wrote:
> --- ow <oneway_111@yahoo.com> wrote:
> > pgSql 7.4.0 on RH7.3
> > 
> > Hi,
> > 
> > It appears that pgSql somehow logs messages to BOTH /var/log/messages and
> > /var/log/pgsql. I expected that it would only log to /var/log/pgsql.
> > 
> 
> It appears I forgot to add local0.none on the /var/log/messages line in
> /etc/syslog.conf. Once added it logs only to /var/log/pgsql.
> 
> Strange though ... when I changed "local0" to "pgsql" in /etc/syslog.conf and
> /var/lib/pgsql/data/postgresql.conf the logging stopped completely. Works with
> local0 though. Anyhow

The log-levels (panic,...info,...local0,...) are enumerated values
hardcoded in syslog; pgsql is not one of those, so syslog would not
recognise it or act on it.

-- 
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight, UK                             http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
                 ========================================
     "Who shall ascend into the hill of the LORD? or who 
      shall stand in his holy place? He that hath clean 
      hands, and a pure heart..."            Psalms 24:3,4 




^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2003-11-29 17:56 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-11-29 10:48 Why both?: /var/log/messages AND /var/log/pgsql. ow <oneway_111@yahoo.com>
2003-11-29 13:32 ` ow <oneway_111@yahoo.com>
2003-11-29 17:56   ` Oliver Elphick <olly@lfix.co.uk>

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