[Swan-dev] prefixing debug lines with connection/state?

Andrew Cagney andrew.cagney at gmail.com
Mon Oct 30 17:15:19 UTC 2017


Burying the | in the middle of the line like this:

"westnet-eastnet" #1 MAIN_I3: | inserting event EVENT_v1_RETRANSMIT,
timeout in 0.500000 seconds for #1
"westnet-eastnet" #1 MAIN_I3: STATE_MAIN_I3: sent MI3, expecting MR3

just makes it hard to visually identify real log lines.

Andrew




On 30 October 2017 at 12:57, Antony Antony <antony at phenome.org> wrote:

> On Mon, Oct 30, 2017 at 12:43:51PM -0400, Andrew Cagney wrote:
> > On 30 October 2017 at 12:00, Antony Antony <antony at phenome.org> wrote:
> >
> > > On Mon, Oct 30, 2017 at 10:18:58AM -0400, Andrew Cagney wrote:
> > > > On 18 October 2017 at 14:11, Antony Antony <antony at phenome.org>
> wrote:
> > > >
> > > > > 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.
> > > > >
> > > > >
> > > > Yea.  I'm going to add:
> > > >
> > > >   --debug add-prefix
> > >
> > > I would love to see a testrun with this enabled before merging it to
> > > master.
> > > I am wondering how oe tests debug like will look like.  Also if you
> eanble
> > > time.
> > >
> > >
> > The below is from after explicitly enabling the option with:
> >
> >     ipsec whack --debug add-prefix
> >
> > Oct 30 12:38:55.367727: | "private-or-clear#192.1.2.0/24"[1]
> ...192.1.2.23
> > #1 UNDEFINED: category states: 1 count states: 1
> > Oct 30 12:38:55.367875: | "private-or-clear#192.1.2.0/24"[1]
> ...192.1.2.23
> > #1 PARENT_I1: Queuing pending IPsec SA negotiating with 192.1.2.23
> > "private-or-clear#192.1.2.0/24"[1] ...192.1.2.23 IKE SA #1
> > "private-or-clear#192.1.2.0/24"[1] ...192.1.2.23
> > O
>
> this looks odd to me. The prefix should be be before "|" I would like to
> see
> the full log. Interleaved with log lines, Debug dump lines before this goes
> to master.
>
> I am still not convinced it is grep friendly. The way I imagne is
> relatively
> easy to grep and easy to remove the prefix with sed. Hence the suggestion
> "|" before.
>
> -antony
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.libreswan.org/pipermail/swan-dev/attachments/20171030/799f33f8/attachment.html>


More information about the Swan-dev mailing list