pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Patch to update log levels
6+ messages / 3 participants
[nested] [flat]

* Patch to update log levels
@ 2007-09-21 00:42 Joshua D. Drake <jd@commandprompt.com>
  2007-09-21 01:02 ` Re: Patch to update log levels Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 6+ messages in thread

From: Joshua D. Drake @ 2007-09-21 00:42 UTC (permalink / raw)
  To: Patches <pgsql-patches@postgresql.org>; pgsql-docs

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

Here is a patch that documents the syslog log levels and their
correlation to the PostgreSQL log levels per:

http://archives.postgresql.org/pgsql-general/2007-09/msg00982.php

Joshua D. Drake


- --

      === The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564   24x7/Emergency: +1.800.492.2240
PostgreSQL solutions since 1997  http://www.commandprompt.com/
			UNIQUE NOT NULL
Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
PostgreSQL Replication: http://www.commandprompt.com/products/

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFG8xNiATb/zqfZUUQRAodGAKCUiMZf1TUlMF+ijFM9jmndIkxp9wCgp13L
6EyxUqI7ycMw3w8ZeOeexwQ=
=0KcO
-----END PGP SIGNATURE-----

Attachments:

config.sgml.diff (text/x-patch, 4.6K) download *** config.sgml 2007-09-20 17:39:44.000000000 -0700 --- config.sgml.jd 2007-09-20 17:39:18.000000000 -0700 *************** *** 2625,2631 **** <term><literal>DEBUG[1-5]</literal></term> <listitem> <para> ! Provides information for use by developers. </para> </listitem> </varlistentry> --- 2625,2631 ---- <term><literal>DEBUG[1-5]</literal></term> <listitem> <para> ! Provides information for use by developers. The syslog facility will log DEBUG[1-5] as LOG_DEBUG. </para> </listitem> </varlistentry> *************** *** 2635,2641 **** <listitem> <para> Provides information implicitly requested by the user, ! e.g., during <command>VACUUM VERBOSE</>. </para> </listitem> </varlistentry> --- 2635,2641 ---- <listitem> <para> Provides information implicitly requested by the user, ! e.g., during <command>VACUUM VERBOSE</>. The syslog facility will log INFO as LOG_INFO. </para> </listitem> </varlistentry> *************** *** 2646,2652 **** <para> Provides information that might be helpful to users, e.g., truncation of long identifiers and the creation of indexes as part ! of primary keys. </para> </listitem> </varlistentry> --- 2646,2652 ---- <para> Provides information that might be helpful to users, e.g., truncation of long identifiers and the creation of indexes as part ! of primary keys. The syslog facility will log NOTICE as LOG_NOTICE. </para> </listitem> </varlistentry> *************** *** 2656,2662 **** <listitem> <para> Provides warnings to the user, e.g., <command>COMMIT</> ! outside a transaction block. </para> </listitem> </varlistentry> --- 2656,2662 ---- <listitem> <para> Provides warnings to the user, e.g., <command>COMMIT</> ! outside a transaction block. The syslog facility will log WARNING as LOG_NOTICE. </para> </listitem> </varlistentry> *************** *** 2665,2671 **** <term><literal>ERROR</literal></term> <listitem> <para> ! Reports an error that caused the current command to abort. </para> </listitem> </varlistentry> --- 2665,2671 ---- <term><literal>ERROR</literal></term> <listitem> <para> ! Reports an error that caused the current command to abort. The syslog facility will log ERROR as LOG_WARNING. </para> </listitem> </varlistentry> *************** *** 2675,2681 **** <listitem> <para> Reports information of interest to administrators, e.g., ! checkpoint activity. </para> </listitem> </varlistentry> --- 2675,2681 ---- <listitem> <para> Reports information of interest to administrators, e.g., ! checkpoint activity. The syslog facility will log LOG as LOG_INFO. </para> </listitem> </varlistentry> *************** *** 2684,2690 **** <term><literal>FATAL</literal></term> <listitem> <para> ! Reports an error that caused the current session to abort. </para> </listitem> </varlistentry> --- 2684,2690 ---- <term><literal>FATAL</literal></term> <listitem> <para> ! Reports an error that caused the current session to abort. The syslog facility will log FATAL as LOG_ERR. </para> </listitem> </varlistentry> *************** *** 2693,2699 **** <term><literal>PANIC</literal></term> <listitem> <para> ! Reports an error that caused all sessions to abort. </para> </listitem> </varlistentry> --- 2693,2699 ---- <term><literal>PANIC</literal></term> <listitem> <para> ! Reports an error that caused all sessions to abort. The syslog facility will log PANIC as LOG_CRIT. </para> </listitem> </varlistentry>
^ permalink raw reply [nested|flat] 6+ messages in thread

* Re: Patch to update log levels
  2007-09-21 00:42 Patch to update log levels Joshua D. Drake <jd@commandprompt.com>
@ 2007-09-21 01:02 ` Tom Lane <tgl@sss.pgh.pa.us>
  2007-09-21 01:10   ` Re: Patch to update log levels Joshua D. Drake <jd@commandprompt.com>
  0 siblings, 1 reply; 6+ messages in thread

From: Tom Lane @ 2007-09-21 01:02 UTC (permalink / raw)
  To: Joshua D. Drake <jd@commandprompt.com>; +Cc: Patches <pgsql-patches@postgresql.org>; pgsql-docs

"Joshua D. Drake" <jd@commandprompt.com> writes:
> Here is a patch that documents the syslog log levels and their
> correlation to the PostgreSQL log levels per:

This seems like quite the wrong place to document it --- I'd have
thought somewhere near the discussion of syslog logging would be
appropriate.  Putting it here means you're in the face of people
who do not even have syslog (ie, Windows users)

			regards, tom lane



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

* Re: Patch to update log levels
  2007-09-21 00:42 Patch to update log levels Joshua D. Drake <jd@commandprompt.com>
  2007-09-21 01:02 ` Re: Patch to update log levels Tom Lane <tgl@sss.pgh.pa.us>
@ 2007-09-21 01:10   ` Joshua D. Drake <jd@commandprompt.com>
  2007-09-21 01:27     ` Re: [PATCHES] Patch to update log levels Joshua D. Drake <jd@commandprompt.com>
  0 siblings, 1 reply; 6+ messages in thread

From: Joshua D. Drake @ 2007-09-21 01:10 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Patches <pgsql-patches@postgresql.org>; pgsql-docs

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Tom Lane wrote:
> "Joshua D. Drake" <jd@commandprompt.com> writes:
>> Here is a patch that documents the syslog log levels and their
>> correlation to the PostgreSQL log levels per:
> 
> This seems like quite the wrong place to document it --- I'd have
> thought somewhere near the discussion of syslog logging would be
> appropriate.  Putting it here means you're in the face of people
> who do not even have syslog (ie, Windows users)

Fair enough. Except that we don't really talk about syslog anywhere. We
do here:

http://developer.postgresql.org/pgdocs/postgres/runtime-config-logging.html#RUNTIME-CONFIG-LOGGING-W...

Which is pretty much where I put it.

Do we have some kind of correlation for eventlog on windows? Then I
could just use a table to show the relationships. Something like:

Log Level
PostgreSQL		Syslog		EventLog
Panic			LOG_CRIT	Usual Behavior

Sincerely,

Joshua D. Drake


> 
> 			regards, tom lane
> 


- --

      === The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564   24x7/Emergency: +1.800.492.2240
PostgreSQL solutions since 1997  http://www.commandprompt.com/
			UNIQUE NOT NULL
Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
PostgreSQL Replication: http://www.commandprompt.com/products/

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFG8xnvATb/zqfZUUQRAjVLAKCaSj8FRfz4XXQmHsdzFKxEE49lNQCgiH0z
yVIbB+YCyiP1HXLWrvujg38=
=GtSc
-----END PGP SIGNATURE-----



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

* Re: [PATCHES] Patch to update log levels
  2007-09-21 00:42 Patch to update log levels Joshua D. Drake <jd@commandprompt.com>
  2007-09-21 01:02 ` Re: Patch to update log levels Tom Lane <tgl@sss.pgh.pa.us>
  2007-09-21 01:10   ` Re: Patch to update log levels Joshua D. Drake <jd@commandprompt.com>
@ 2007-09-21 01:27     ` Joshua D. Drake <jd@commandprompt.com>
  2007-09-21 08:30       ` Re: [PATCHES] Patch to update log levels Magnus Hagander <magnus@hagander.net>
  2007-09-22 19:11       ` Re: [PATCHES] Patch to update log levels Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 2 replies; 6+ messages in thread

From: Joshua D. Drake @ 2007-09-21 01:27 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Patches <pgsql-patches@postgresql.org>; pgsql-docs

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Joshua D. Drake wrote:
> Tom Lane wrote:
>> "Joshua D. Drake" <jd@commandprompt.com> writes:
>>> Here is a patch that documents the syslog log levels and their
>>> correlation to the PostgreSQL log levels per:
>> This seems like quite the wrong place to document it --- I'd have
>> thought somewhere near the discussion of syslog logging would be
>> appropriate.  Putting it here means you're in the face of people
>> who do not even have syslog (ie, Windows users)
> 
> Fair enough. Except that we don't really talk about syslog anywhere. We
> do here:
> 
> http://developer.postgresql.org/pgdocs/postgres/runtime-config-logging.html#RUNTIME-CONFIG-LOGGING-W...
> 
> Which is pretty much where I put it.
> 
> Do we have some kind of correlation for eventlog on windows? Then I
> could just use a table to show the relationships. Something like:
> 

Is this correct for Windows?

1392 	    switch (level)
1393 	    {
1394 	        case DEBUG5:
1395 	        case DEBUG4:
1396 	        case DEBUG3:
1397 	        case DEBUG2:
1398 	        case DEBUG1:
1399 	        case LOG:
1400 	        case COMMERROR:
1401 	        case INFO:
1402 	        case NOTICE:
1403 	            eventlevel = EVENTLOG_INFORMATION_TYPE;
1404 	            break;
1405 	        case WARNING:
1406 	            eventlevel = EVENTLOG_WARNING_TYPE;
1407 	            break;
1408 	        case ERROR:
1409 	        case FATAL:
1410 	        case PANIC:
1411 	        default:
1412 	            eventlevel = EVENTLOG_ERROR_TYPE;
1413 	            break;
1414 	    }

Sincerely,

Joshua D. Drake



> Log Level
> PostgreSQL		Syslog		EventLog
> Panic			LOG_CRIT	Usual Behavior
> 
> Sincerely,
> 
> Joshua D. Drake
> 
> 
>> 			regards, tom lane
> 
> 
> 

- ---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend



- --

      === The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564   24x7/Emergency: +1.800.492.2240
PostgreSQL solutions since 1997  http://www.commandprompt.com/
			UNIQUE NOT NULL
Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
PostgreSQL Replication: http://www.commandprompt.com/products/

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFG8x4cATb/zqfZUUQRAmaPAKCQIpHDRBCFP9pLlyi88huJKyWbFgCfd4K3
EGs9/5lJEkV1UxJuqJBUXFY=
=f9R/
-----END PGP SIGNATURE-----



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

* Re: [PATCHES] Patch to update log levels
  2007-09-21 00:42 Patch to update log levels Joshua D. Drake <jd@commandprompt.com>
  2007-09-21 01:02 ` Re: Patch to update log levels Tom Lane <tgl@sss.pgh.pa.us>
  2007-09-21 01:10   ` Re: Patch to update log levels Joshua D. Drake <jd@commandprompt.com>
  2007-09-21 01:27     ` Re: [PATCHES] Patch to update log levels Joshua D. Drake <jd@commandprompt.com>
@ 2007-09-21 08:30       ` Magnus Hagander <magnus@hagander.net>
  1 sibling, 0 replies; 6+ messages in thread

From: Magnus Hagander @ 2007-09-21 08:30 UTC (permalink / raw)
  To: Joshua D. Drake <jd@commandprompt.com>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; Patches <pgsql-patches@postgresql.org>; pgsql-docs

On Thu, Sep 20, 2007 at 06:27:57PM -0700, Joshua D. Drake wrote:
> Joshua D. Drake wrote:
> > Tom Lane wrote:
> >> "Joshua D. Drake" <jd@commandprompt.com> writes:
> >>> Here is a patch that documents the syslog log levels and their
> >>> correlation to the PostgreSQL log levels per:
> >> This seems like quite the wrong place to document it --- I'd have
> >> thought somewhere near the discussion of syslog logging would be
> >> appropriate.  Putting it here means you're in the face of people
> >> who do not even have syslog (ie, Windows users)
> > 
> > Fair enough. Except that we don't really talk about syslog anywhere. We
> > do here:
> > 
> > http://developer.postgresql.org/pgdocs/postgres/runtime-config-logging.html#RUNTIME-CONFIG-LOGGING-W...
> > 
> > Which is pretty much where I put it.
> > 
> > Do we have some kind of correlation for eventlog on windows? Then I
> > could just use a table to show the relationships. Something like:
> > 
> 
> Is this correct for Windows?
> 
> 1392 	    switch (level)
> 1393 	    {
> 1394 	        case DEBUG5:
> 1395 	        case DEBUG4:
> 1396 	        case DEBUG3:
> 1397 	        case DEBUG2:
> 1398 	        case DEBUG1:
> 1399 	        case LOG:
> 1400 	        case COMMERROR:
> 1401 	        case INFO:
> 1402 	        case NOTICE:
> 1403 	            eventlevel = EVENTLOG_INFORMATION_TYPE;
> 1404 	            break;
> 1405 	        case WARNING:
> 1406 	            eventlevel = EVENTLOG_WARNING_TYPE;
> 1407 	            break;
> 1408 	        case ERROR:
> 1409 	        case FATAL:
> 1410 	        case PANIC:
> 1411 	        default:
> 1412 	            eventlevel = EVENTLOG_ERROR_TYPE;
> 1413 	            break;
> 1414 	    }

Yes.

//Magnus



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

* Re: [PATCHES] Patch to update log levels
  2007-09-21 00:42 Patch to update log levels Joshua D. Drake <jd@commandprompt.com>
  2007-09-21 01:02 ` Re: Patch to update log levels Tom Lane <tgl@sss.pgh.pa.us>
  2007-09-21 01:10   ` Re: Patch to update log levels Joshua D. Drake <jd@commandprompt.com>
  2007-09-21 01:27     ` Re: [PATCHES] Patch to update log levels Joshua D. Drake <jd@commandprompt.com>
@ 2007-09-22 19:11       ` Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 0 replies; 6+ messages in thread

From: Tom Lane @ 2007-09-22 19:11 UTC (permalink / raw)
  To: Joshua D. Drake <jd@commandprompt.com>; +Cc: Patches <pgsql-patches@postgresql.org>; pgsql-docs

"Joshua D. Drake" <jd@commandprompt.com> writes:
>> Do we have some kind of correlation for eventlog on windows? Then I
>> could just use a table to show the relationships.

Done.

			regards, tom lane



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


end of thread, other threads:[~2007-09-22 19:11 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-09-21 00:42 Patch to update log levels Joshua D. Drake <jd@commandprompt.com>
2007-09-21 01:02 ` Tom Lane <tgl@sss.pgh.pa.us>
2007-09-21 01:10   ` Joshua D. Drake <jd@commandprompt.com>
2007-09-21 01:27     ` Joshua D. Drake <jd@commandprompt.com>
2007-09-21 08:30       ` Magnus Hagander <magnus@hagander.net>
2007-09-22 19:11       ` Tom Lane <tgl@sss.pgh.pa.us>

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