[Swan-dev] prefixing debug lines with connection/state?
Antony Antony
antony at phenome.org
Wed Oct 18 18:11:58 UTC 2017
On Wed, Oct 18, 2017 at 11:35:55AM -0400, Andrew Cagney wrote:
> Hi,
>
> I'm wondering if debug output should be prefixed with the connection/state
> information as in:
>
> | "westnet-eastnet" #1: .....
If every line add such a prefix it would be hard to read, I would struggle
to read the debug logs prepended with 10-30 character prefix, think of OE,
the prefix will be long. I have tried it in th past and did not like it, except
for grepping:)
It could be setup option, like logtime.
Would per peer logging be an option. I don't know what is the current state
of it.
> for our our tests it doesn't matter, but in the field when there are lots
> of connections, being able to grep for this string makes things easier
Greping sounds attractive. However, in simple cases it would be hard to
read. I read them very often. How would the grep work if connections are
instances. You have to know more than connection name.
Greping for state number helped in the past with O(10) non instance
connections.
Note: some of the debug lines already prepend log prefix. In those cases you
will get double prefix.
More information about the Swan-dev
mailing list