Log Clutter

From: Greg Stark <gsstark(at)mit(dot)edu>
To: pgsql-general(at)postgresql(dot)org
Subject: Log Clutter
Date: 2004-08-20 16:08:45
Message-ID: 87d61ldc6q.fsf@stark.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Incidentally, am I the only one that finds the new 7.4 log messages too
cluttered? In 7.3 my application printed progress messages using "raise
notice" like this:

2004-08-20 11:58:16 [4369] NOTICE: Processing 6561 1/15127...
2004-08-20 11:58:19 [4369] NOTICE: Processing 6561 1/15127...Done Found 3800
2004-08-20 11:58:19 [4369] NOTICE: Processing 6794 2/15127...
2004-08-20 11:58:20 [4369] NOTICE: Processing 6794 2/15127...Done Found 4000
2004-08-20 11:58:20 [4369] NOTICE: Processing 10045 3/15127...
2004-08-20 11:58:20 [4369] NOTICE: Processing 10045 3/15127...Done Found 0
2004-08-20 11:58:20 [4369] NOTICE: Processing 12325 4/15127...
2004-08-20 11:58:20 [4369] NOTICE: Processing 12325 4/15127...Done Found 0
2004-08-20 11:58:20 [4369] NOTICE: Processing 14957 5/15127...
2004-08-20 11:58:20 [4369] NOTICE: Processing 14957 5/15127...Done Found 0

In 7.4 it helpfully tells me what function and line number is executing, but
since it's always the same it's pretty useless:

2004-08-20 11:58:16 [4369] NOTICE: Processing 6561 1/15127...
CONTEXT: PL/pgSQL function "process_regions" line 2 at return
STATEMENT: select process_regions();
2004-08-20 11:58:19 [4369] NOTICE: Processing 6561 1/15127...Done Found 3800
CONTEXT: PL/pgSQL function "process_regions" line 2 at return
STATEMENT: select process_regions();
2004-08-20 11:58:19 [4369] NOTICE: Processing 6794 2/15127...
CONTEXT: PL/pgSQL function "process_regions" line 2 at return
STATEMENT: select process_regions();
2004-08-20 11:58:20 [4369] NOTICE: Processing 6794 2/15127...Done Found 4000
CONTEXT: PL/pgSQL function "process_regions" line 2 at return
STATEMENT: select process_regions();
2004-08-20 11:58:20 [4369] NOTICE: Processing 10045 3/15127...
CONTEXT: PL/pgSQL function "process_regions" line 2 at return
STATEMENT: select process_regions();
2004-08-20 11:58:20 [4369] NOTICE: Processing 10045 3/15127...Done Found 0
CONTEXT: PL/pgSQL function "process_regions" line 2 at return
STATEMENT: select process_regions();
2004-08-20 11:58:20 [4369] NOTICE: Processing 12325 4/15127...
CONTEXT: PL/pgSQL function "process_regions" line 2 at return
STATEMENT: select process_regions();
2004-08-20 11:58:20 [4369] NOTICE: Processing 12325 4/15127...Done Found 0
CONTEXT: PL/pgSQL function "process_regions" line 2 at return
STATEMENT: select process_regions();
2004-08-20 11:58:20 [4369] NOTICE: Processing 14957 5/15127...
CONTEXT: PL/pgSQL function "process_regions" line 2 at return
STATEMENT: select process_regions();
2004-08-20 11:58:20 [4369] NOTICE: Processing 14957 5/15127...Done Found 0
CONTEXT: PL/pgSQL function "process_regions" line 2 at return
STATEMENT: select process_regions();

It also seems to print these after almost every query I have. That's because I
use SQL functions lang_en()/lang_fr() to handle l10n. It also seems too
chatty.

2004-08-18 21:25:50 [16741] LOG: statement: select $1 [1]
CONTEXT: SQL function "lang_en" during inlining
2004-08-18 21:25:50 [16741] LOG: statement: select $1 [1]
CONTEXT: SQL function "lang_en" during inlining
2004-08-18 21:25:50 [16741] LOG: statement: select $1 [1]
CONTEXT: SQL function "lang_en" during inlining
2004-08-18 21:25:50 [16741] LOG: statement: select $1 [1]
CONTEXT: SQL function "lang_en" during inlining
2004-08-18 21:25:50 [16741] LOG: statement: select $1 [1]
CONTEXT: SQL function "lang_en" during inlining
2004-08-18 21:25:50 [16741] LOG: statement: select $1 [1]
CONTEXT: SQL function "lang_en" during inlining
2004-08-18 21:25:50 [16741] LOG: statement: select $1 [1]
CONTEXT: SQL function "lang_en" during inlining

As far as I can see there's no way to disable either of these two cases
without disabling a lot more messages along with them. It would be nice...

--
greg

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Wayne Fang 2004-08-20 16:11:02 libpq on the server
Previous Message Stephan Szabo 2004-08-20 15:58:51 Re: insert waiting