freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "James K. Lowden" <jklowden AT schemamania.org>
- To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] Log, patch and format
- Date: Thu, 9 Dec 2004 08:28:51 -0500
"ZIGLIO, Frediano, VF-IT" <Frediano.Ziglio AT vodafone.com> wrote:
> I'm trying to change log format to include source line informations (as
> suggested)
[cool patch snipped]
> It's working fine but log format it's not so fine. Just an extract (just
> 3 lines):
>
> 11:20:41.230206 31045 (token.c:320):looking for login token, got
> e3(ENVCHANGE)
> 11:20:41.230238 31045 (token.c:105):tds_process_default_tokens() marker
> is e3(ENVCHANGE)
> 11:20:41.230259 31045 (read.c:178):tds_get_string: reading 8 from wire
> to give 4 to client.
>
> As anyone can see line it's quite long. The reason it's that it contains
> all possible informations:
> - time
> - pid
> - source file and line
> - message
> I know that James don't like that much time at every line but it's very
> useful to discover problems related to speed.
> Perhaps it would be better to define some flags to enable/disable every
> component (time, pid, source and perhaps thread id where pid1 == pid2 do
> not means thread1 == thread2)
I can see the occasional value in including time, and I know even isn't
useful in most situations.
We have a place for a flag to include/exclude columns: the TDS_DBG_*
bitmask.
#define TDS_DBG_TIME __FILE__, ((__LINE__ << 4) | 8)
#define TDS_DBG_PID __FILE__, ((__LINE__ << 4) | 9)
Then reformat accordingly, in tds_dump().
I think time and pid should be disabled in the default mask (currently
'99'), because problems posted to the list normally don't need them. If
someone needs it, we can say "set your log mask to 0xf8" or whatever.
Nice work, Freddy. Thanks for tackling it.
--jkl
-
[freetds] Log, patch and format,
ZIGLIO, Frediano, VF-IT, 12/09/2004
- Re: [freetds] Log, patch and format, James K. Lowden, 12/09/2004
- <Possible follow-up(s)>
-
RE: [freetds] Log, patch and format,
ZIGLIO, Frediano, VF-IT, 12/10/2004
- Re: [freetds] Log, patch and format, James K. Lowden, 12/10/2004
Archive powered by MHonArc 2.6.24.