Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ General ➜ Logging in colour

Logging in colour

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Teclis   (13 posts)  Bio
Date Thu 24 Jul 2003 12:38 PM (UTC)
Message
No matter how many different ways i try to log an event in colour, there seems to be no hope unless i save it as a internet explorer file (.html) i think. I play on T2T, a MUD, and wish to beable to log sessions in colour. I can log a session to a .txt file, but then it is only in black and white, or i can log it as a html, which does not allow editing. Is there a way to log in ainsi color? I would be very grateful of any infomation that could help me conquer this problem. If no, then is there a way that i can send a log file to a log site, and have them accept, when they only accept txt files and ainsi files?
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #1 on Thu 24 Jul 2003 10:10 PM (UTC)
Message
If your problem is simply that you can't edit the HTML, you can solve that very easily by opening your HTML log file as if it were a text file. Of course, you'd need to understand basic HTML to make sense of parts of it, but it's certainly editable.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #2 on Fri 25 Jul 2003 01:16 AM (UTC)
Message
There is a simple solution and a slightly more complex solution.

The simple solution is to simply turn on the "raw" log flag in the logging configuration. This simply logs everything that arrives from the MUD "as is". This may well work for you, as all the ANSI codes will still be there. However there are a few disadvantages of that method:


  • If the MUD is using MXP you will also log the MXP commands (eg. <room>blah</room>).

  • You will also log any incoming telnet negotiation sequences.

  • Any triggers you set up that omit from log will not have any effect.

  • Commands will not be logged.


The more complex solution is a plugin I just wrote. What this does is use a trigger and alias. The trigger has a low sequence number (5) so it will match all incoming text, and is set to match everything. It calls a script that reassembles the line using ANSI sequences, and writes that to the log file. It has the "keep evaluating" flag set so other triggers still match. It has "omit from log" set so you don't log each line twice.

The alias does a similar thing for commands you type, but is a bit simpler because it just logs the command in straight white on black (you could change that easily).

You can find this plugin (ANSI_Log) on the plugins page. Just download it and install it into any world you want to do ANSI logging for.


http://www.gammon.com.au/mushclient/plugins/


However there are a couple of issues you should be aware of:


  • If the MUD is sending MXP commands to change colours to non-standard colours (ones which don't have an ANSI equivalent) then they won't be logged in the correct colour - this is not a bug, it is simply because there is no ANSI equivalent for, say, "darksalmon" colour.

  • Commands are just logged in white on black - however you can edit the plugin and change it by adding a couple of extra lines.

  • The extra processing involved may slow the client down a bit, however I didn't notice much performance impact on my old 166 MHz Pentium, so this is probably not a big issue.

  • I haven't tested every combination (eg. inverse) so let me know if it doesn't work perfectly.


- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Teclis   (13 posts)  Bio
Date Reply #3 on Fri 25 Jul 2003 10:02 AM (UTC)
Message
Wow, thanks a lot Nick, i never realised how helpful the site actually is!!
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


17,885 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.