public inbox for [email protected]
help / color / mirror / Atom feedFrom: Melanie Plageman <[email protected]>
To: Tom Lane <[email protected]>
Cc: Adrian Klaver <[email protected]>
Cc: Tefft, Michael J <[email protected]>
Cc: [email protected]
Subject: Re: Capturing both IP address and hostname in the log
Date: Tue, 20 May 2025 11:48:13 -0400
Message-ID: <CAAKRu_ZWKOWCfxsg_nthFusiax9OOiOa8bmCsh06F6QSZ_W5FA@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <BN8PR04MB550874EE58EC715656C3D3D2D0B72@BN8PR04MB5508.namprd04.prod.outlook.com>
<[email protected]>
<[email protected]>
On Thu, Apr 10, 2025 at 12:00 PM Tom Lane <[email protected]> wrote:
> Melanie recently committed a patch (9219093ca) that purports to
> generalize our log_connections logging ability:
>
> Convert the boolean log_connections GUC into a list GUC comprised of
> the
> connection aspects to log.
>
> This gives users more control over the volume and kind of connection
> logging.
>
> The current log_connections options are 'receipt', 'authentication',
> and
> 'authorization'. The empty string disables all connection logging.
> 'all'
> enables all available connection logging.
>
> I wonder if it'd be reasonable to remove the separate log_hostname GUC
> and fold it into this infrastructure, and while doing so make it
> possible to log either or both of the client IP address and hostname.
> (For that matter, I think there is interest in being able to capture
> the server IP address too, cf 3516ea768. You might wish to log the
> IP address only once, not in every log line.)
Seems reasonable to me. I'd be willing to move such a thing forward but
would want to see the feature requestors' specific desired behavior (e.g.
an option for each of hostname, client ip address, and server address?).
Also, if they write a WIP patch at least to config.sgml, it would also help
me gauge how serious of a request it is or, rather, how satisfactory a
solution a log_connections option is.
Perhaps there are people who absolutely love log_hostname and don't want to
see it deprecated as a separate GUC?
I also think folding in log_disconnections as a "disconnection" option
makes sense. I do have some anxiety that a very long list of options will
anger users -- but I suppose that ship mostly sailed.
- Melanie
view thread (6+ messages)
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: Capturing both IP address and hostname in the log
In-Reply-To: <CAAKRu_ZWKOWCfxsg_nthFusiax9OOiOa8bmCsh06F6QSZ_W5FA@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox