<div dir="ltr"><div><div>Burying the | in the middle of the line like this:<br><br>"westnet-eastnet" #1 MAIN_I3: | inserting event EVENT_v1_RETRANSMIT, timeout in 0.500000 seconds for #1<br>"westnet-eastnet" #1 MAIN_I3: STATE_MAIN_I3: sent MI3, expecting MR3<br><br></div>just makes it hard to visually identify real log lines.</div><div><br></div>Andrew<br><br><div><br><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 30 October 2017 at 12:57, Antony Antony <span dir="ltr"><<a href="mailto:antony@phenome.org" target="_blank">antony@phenome.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Mon, Oct 30, 2017 at 12:43:51PM -0400, Andrew Cagney wrote:<br>
> On 30 October 2017 at 12:00, Antony Antony <<a href="mailto:antony@phenome.org">antony@phenome.org</a>> wrote:<br>
><br>
> > On Mon, Oct 30, 2017 at 10:18:58AM -0400, Andrew Cagney wrote:<br>
> > > On 18 October 2017 at 14:11, Antony Antony <<a href="mailto:antony@phenome.org">antony@phenome.org</a>> wrote:<br>
> > ><br>
> > > > On Wed, Oct 18, 2017 at 11:35:55AM -0400, Andrew Cagney wrote:<br>
> > > > > Hi,<br>
> > > > ><br>
> > > > > I'm wondering if debug output should be prefixed with the<br>
> > > > connection/state<br>
> > > > > information as in:<br>
> > > > ><br>
> > > > > | "westnet-eastnet" #1: .....<br>
> > > ><br>
> > > > If every line add such a prefix it would be hard to read, I would<br>
> > struggle<br>
> > > > to read the debug logs prepended with 10-30 character prefix, think of<br>
> > OE,<br>
> > > > the prefix will be long. I have tried it in th past and did not like<br>
> > it,<br>
> > > > except<br>
> > > > for grepping:)<br>
> > > ><br>
> > > > It could be setup option, like logtime.<br>
> > > ><br>
> > > ><br>
> > > Yea.  I'm going to add:<br>
> > ><br>
> > >   --debug add-prefix<br>
> ><br>
> > I would love to see a testrun with this enabled before merging it to<br>
> > master.<br>
> > I am wondering how oe tests debug like will look like.  Also if you eanble<br>
> > time.<br>
> ><br>
> ><br>
> The below is from after explicitly enabling the option with:<br>
><br>
>     ipsec whack --debug add-prefix<br>
><br>
> Oct 30 12:38:55.367727: | "private-or-clear#<a href="http://192.1.2.0/24" rel="noreferrer" target="_blank">192.1.2.0/24</a><wbr>"[1] ...192.1.2.23<br>
> #1 UNDEFINED: category states: 1 count states: 1<br>
> Oct 30 12:38:55.367875: | "private-or-clear#<a href="http://192.1.2.0/24" rel="noreferrer" target="_blank">192.1.2.0/24</a><wbr>"[1] ...192.1.2.23<br>
> #1 PARENT_I1: Queuing pending IPsec SA negotiating with 192.1.2.23<br>
> "private-or-clear#<a href="http://192.1.2.0/24" rel="noreferrer" target="_blank">192.1.2.0/24</a><wbr>"[1] ...192.1.2.23 IKE SA #1<br>
> "private-or-clear#<a href="http://192.1.2.0/24" rel="noreferrer" target="_blank">192.1.2.0/24</a><wbr>"[1] ...192.1.2.23<br>
> O<br>
<br>
</div></div>this looks odd to me. The prefix should be be before "|" I would like to see<br>
the full log. Interleaved with log lines, Debug dump lines before this goes<br>
to master.<br>
<br>
I am still not convinced it is grep friendly. The way I imagne is relatively<br>
easy to grep and easy to remove the prefix with sed. Hence the suggestion<br>
"|" before.<br>
<span class="HOEnZb"><font color="#888888"><br>
-antony<br>
</font></span></blockquote></div><br></div>