Page 1 of 1

MX diags .txt Interrogator

Posted: Thu 09 Sep 2021 10:03 am
by beteljuice
Yup ... It's another plaything from the beteljuice stable.

MX diags .txt Interrogator

You can do basic regex type stuff (search for things) in a diags .txt file.

Like everything else in life it's a good idea to ask the right question :)

It's javascript so performance will very, very much depend upon your PC / browser / file size.

It has been tried on a 12 meg file / over a million entries, and unsurprisingly the browser farted a bit 8-)

Edit: Don't let the next few posts about scary regex put you off - Just type the bit of text you want to find in any entry and click "search"
The entries will be highlighted in GREEN or you can tick "Exclude !" to hide them.

For real regex people, please note.
The search expression is per entry, NOT the file as a whole.

Re: MX diags .txt Interrogator

Posted: Thu 09 Sep 2021 11:54 am
by HansR
Ah... nice. Don't know if I am going to use it much but still.... nice.

I tried it with ^((?!Realtime).)*$ to get all lines which did not contain the word Realtime. Seemed sensible because I never (rarely) have errors so I was curious what would be left of the log when those repetitive non-informational lines would have disappeared (I have to set Debug on etc If I really need info). The result was a nicely greened lines which remained and the lines with Realtime had been not greened but remained visible.

I assume that was OK.

Re: MX diags .txt Interrogator

Posted: Thu 09 Sep 2021 1:00 pm
by beteljuice
@Hans ...

I didn't dare try such a complex expression :lol: - So I'm very pleased it was 'accepted' and worked :clap:
The result was a nicely greened lines which remained and the lines with Realtime had been not greened but remained visible.
Matches to the question (NOT Realtime) are highlighted, with 'point of interest' a brighter highlight.
Pressing the 'collapse' option will show only the matches.

B.T.W. I'm still trying to see how your negative expression got through and worked :?
It looks like by using the ^ and the $, full regex is evaluated .... but I'm probably wrong :bash:

For someone who says they hate regex it's a cracker to throw at my poor program :lol: :lol:

It's intended for simple queries for simple people (like me !) using simple text (altime) with possibly an (AND) .*something else
I've just been emboldened to try (OR) | in simple text ... It works :clap:

Edit: Hmm ... I wonder if I could / should create a 'match' or 'exclude' option (negate) :groan:

Re: MX diags .txt Interrogator

Posted: Thu 09 Sep 2021 2:25 pm
by HansR
beteljuice wrote: Thu 09 Sep 2021 1:00 pm B.T.W. I'm still trying to see how your negative expression got through and worked :?
So am I :lol:

beteljuice wrote: Thu 09 Sep 2021 1:00 pm It looks like by using the ^ and the $, full regex is evaluated .... but I'm probably wrong :bash:
I really have no idea
beteljuice wrote: Thu 09 Sep 2021 1:00 pm For someone who says they hate regex it's a cracker to throw at my poor program :lol: :lol:
:lol: :lol: Google is my friend: I looked for a challenge and I found something with a claim and put that to the test for your claim that it could handle regex. But really, I have no idea
It looks lovely though. And had I remained silent I would have gained a lot of respect no doubt. But with Google everybody can be a programmer ;)
beteljuice wrote: Thu 09 Sep 2021 1:00 pm Edit: Hmm ... I wonder if I could / should create a 'match' or 'exclude' option (negate) :groan:
Yes you can :clap:

Re: MX diags .txt Interrogator

Posted: Thu 09 Sep 2021 9:08 pm
by beteljuice
O.K.

New, improved, blah, blah ....

Now has an 'exclude' option for hiding things rather than promoting them.

Used together with | (OR)('pipe' symbol) this can be very powerful.

Suppose you want to 'hide' realtime

text to enter> realt
tick the "Exclude !" checkbox.

Suppose you also want to 'hide' everything that happened between 21:00:00 > 21:59:59
timestamp example 2021-07-12 21:37:15.908
We are interested in the RED including the preceding <space>

text to enter> realt| 21:

Re: MX diags .txt Interrogator

Posted: Fri 10 Sep 2021 6:51 am
by HansR
OK that is an improvement indeed.

But now I wanted to also remove all lines with ' DoLogFile' so I entered:

Code: Select all

Realtime | DoLogFile
but that does not work as you can see:
Schermafbeelding 2021-09-10 083854.jpg
What I would like to do is exclude everything between "Normal running" and the shutdown loglines, maybe only for every read one line (e.g. the Starting - Loop) to have a proof of life. All the rest is redundant and errors/deviations would be spotted immediately. CMX could also remove this type of redundancy in messaging I guess, but anyhow, that is how I would use your tool.

So the current question is: why does it include some lines with the word Realtime and some not (the array lines like Realtime[0]), that must be in the separator '[' , but then the '[' should limit the realtime for comparison, no?

Re: MX diags .txt Interrogator

Posted: Fri 10 Sep 2021 7:36 am
by beteljuice
But now I wanted to also remove all lines with ' DoLogFile' so I entered:

Realtime | DoLogFile
Well first of all you didn't tick the 'Exclude' checkbox.

Secondly you have a space after Realtime ...

You should be able to shorten the text to: realt| dolo

Re: MX diags .txt Interrogator

Posted: Fri 10 Sep 2021 10:12 am
by HansR
beteljuice wrote: Fri 10 Sep 2021 7:36 am Well first of all you didn't tick the 'Exclude' checkbox.
True but that is irrelevant as it just removes or highlights what I get
beteljuice wrote: Fri 10 Sep 2021 7:36 am Secondly you have a space after Realtime ...
aha... yes.

My current exclusion would give a nice short logfile. Could remove the catch up of WU and even more as well ;)

Code: Select all

realt| dolo| Writing| SFTP| SendLoop| WOW| reception stats
You could make some predefined logfile filters.
Or have the user store some.... challenges challenges...
beteljuice wrote: Fri 10 Sep 2021 7:36 am You should be able to shorten the text to: realt| dolo
Next step is just thinking what I want... ;)

Re: MX diags .txt Interrogator

Posted: Fri 10 Sep 2021 1:46 pm
by beteljuice
I don't know how many different ways MX reports problems

but why not be 'positive' and use something like err|warn|not fou
You then use the 'player' buttons to navigate, or collapse to just show the offending block.

B.T.W. 'Exclude' highlights matches in RED which can be seen when you 'Show All' ;)