Logging Sessions and Stripping

Posted by Adamantplatypus on Sat 12 Sep 2009 03:08 AM — 13 posts, 48,530 views.

#0
I would -really- love to see an option for session logging that strips one's prompt and command input echos.

It's a lot of work and effort to have to edit a log by hand to remove the superfluous crap that doesn't need to be in there.


(I love MUSHclient!)
Amended on Sat 12 Sep 2009 03:11 AM by Adamantplatypus
Australia Forum Administrator #1
That should be easy to do. In the logging configuration you can uncheck the option to log your own commands, so that would omit them.

Then for the prompts, make a trigger that matches a prompt line, and check "omit from log".
#2
Well, I have 'log commands' unchecked, but it still keeps the echos. For instance:

pmote does a jig and hops in place
(my character) does a jig and hops in place

So I have to go back and erase the first part of all that, not sure why.

Nick Gammon said:


Then for the prompts, make a trigger that matches a prompt line, and check "omit from log".


My prompt changes constantly with ticks, I've got the time and weather and stuff in it. Can I configure to the changing parts, too?

Amended on Sat 12 Sep 2009 06:10 PM by Adamantplatypus
Australia Forum Administrator #3
Adamantplatypus said:

Well, I have 'log commands' unchecked, but it still keeps the echos. For instance:

pmote does a jig and hops in place
(my character) does a jig and hops in place

So I have to go back and erase the first part of all that, not sure why.


Well, that is from the MUD - unless you suppress it with a trigger that will always happen. Unchecking "log commands" stops it echoing "pmote does a jig and hops in place", however the line "(my character) does a jig and hops in place" is echoed because that is just another line from the MUD.

Adamantplatypus said:

My prompt changes constantly with ticks, I've got the time and weather and stuff in it. Can I configure to the changing parts, too?


Well, a trigger that has a "*" for the parts that change should do it.
#4
Nick Gammon said:


Well, a trigger that has a "*" for the parts that change should do it.


Okay, here's my prompt RIGHT NOW:


<1475/1475hp 716/722m 406/406mv 95 722 423> [It is 12:00am | Night Time] (Happiness: 96 | BPs: 100) [Common]


So....the hp, mana, movement and the three numbers after it (silver, gold and questpoints, in case anyone cares) change. The time and time both change. Happiness points change. And BPs change. Plus the common, that's the language I'm speaking.

I can't use * for all of them, can I? 'Cause I tried this and it's still picking up the prompt.
Amended on Sat 12 Sep 2009 10:04 PM by Adamantplatypus
Australia Forum Administrator #5
Well, you can. It would help to see what you did, by posting your attempt here. So far we know you tried something, which didn't work.

Template:copying
For advice on how to copy aliases, timers or triggers from within MUSHclient, and paste them into a forum message, please see Copying XML.


Basically I would try to trigger on something like:


<*/*hp */*m */*mv * * *> [It is * | *] (Happiness: * | BPs: *) [*]


Basically replace the things that vary by asterisks. Initially colour the line (in the trigger) so you can see that it fires. Then check "omit from log".

If you happen to have another trigger that also matches the prompt then that other one needs "keep evaluating" checked.
#6
Yeah, for some reason it's not working, even with the evaluation option on. I did try it with it off AND on, this just reflects the "on" variety.


<triggers>
  <trigger
   enabled="y"
   keep_evaluating="y"
   match="&lt;*/*hp */*m */*mv * * *&gt; [It is * | *] (Happiness: * | BPs: *) [*]"
   omit_from_log="y"
   sequence="100"
  >
  </trigger>
</triggers>
Amended on Sun 13 Sep 2009 01:49 AM by Nick Gammon
Australia Forum Administrator #7
I tried your trigger on your sample line and it fired. I set the "change colour and style" to yellow so I knew it fired because it was in yellow.

Can you show a few lines of output from the MUD? Is there something on the end of the prompt? Maybe there are extra spaces I didn't see before.
Australia Forum Administrator #8
Also, go to the Game menu and turn on Trace (Ctrl+Alt+T). That will tell you if other triggers are firing.
#9
Nick Gammon said:

I tried your trigger on your sample line and it fired. I set the "change colour and style" to yellow so I knew it fired because it was in yellow.

Can you show a few lines of output from the MUD? Is there something on the end of the prompt? Maybe there are extra spaces I didn't see before.



<1475/1475hp 669/722m 406/406mv 25 397 1297> [It is 5:00am | Night Time] (Happiness: 97 | BPs: 100) [Common]
i
You are carrying:
a glass of elvish wine
a glittering white stone
an elegant brass compass flask
an otter skin satchel
(Glowing) a spirit hoard

<1475/1475hp 669/722m 406/406mv 25 397 1297> [It is 5:00am | Night Time] (Happiness: 97 | BPs: 100) [Common]
Leynart floats in.

<1475/1475hp 693/722m 406/406mv 25 397 1297> [It is 5:30am | Night Time] (Happiness: 97 | BPs: 100) [Common]
Leynart informs Nichifor Prodan he can not complete his quest.
Nichifor Prodan says (to Leynart) 'I see my faith was miss placed with you.'
Nichifor Prodan says (to Leynart) 'You disappoint me.'

<1475/1475hp 693/722m 406/406mv 25 397 1297> [It is 5:30am | Night Time] (Happiness: 97 | BPs: 100) [Common]
Leynart mutters.
Amended on Sun 13 Sep 2009 02:02 AM by Adamantplatypus
Australia Forum Administrator #10
OK, there were 2 spaces at the end of the prompt which weren't that obvious. If you had used the [code] tags it would have shown up because they preserve spacing. Anyway, this amended trigger (with an asterisk on the end) has matched what you just pasted:


<triggers>
  <trigger
   custom_colour="2"
   enabled="y"
   keep_evaluating="y"
   match="&lt;*/*hp */*m */*mv * * *&gt; [It is * | *] (Happiness: * | BPs: *) [*] *"
   omit_from_log="y"
   sequence="100"
  >
  </trigger>
</triggers>

#11
WORKS! YAY! Thank you so much!
USA #12
Nick Gammon said:

Adamantplatypus said:

Well, I have 'log commands' unchecked, but it still keeps the echos. For instance:

pmote does a jig and hops in place
(my character) does a jig and hops in place

So I have to go back and erase the first part of all that, not sure why.


Well, that is from the MUD - unless you suppress it with a trigger that will always happen. Unchecking "log commands" stops it echoing "pmote does a jig and hops in place", however the line "(my character) does a jig and hops in place" is echoed because that is just another line from the MUD.


Omit from Log just keeps it from getting written to the log file.

Pressing ALT+0 and unchecking "Echo my input in [Custom Color 10]" at the top left, omits the echo from the output window.