Gammon Forum
Entire forum
MUSHclient
General
How to log both text and html to separate files?
How to log both text and html to separate files?
|
It is now over 60 days since the last post. This thread is closed.
  Refresh page
Posted by
| j0nas
(56 posts) bio
|
Date
| Wed 02 Feb 2011 12:33 PM (UTC) |
Message
| I'm looking for the holy grail of logging, one html-log with the color and stuff, and a second log with just the raw text, sans colors and everything. I understand that this isn't supported by the built-in stuff, but surely I can't be the only one who has ever wanted something like this. I did some searching here on the forum, but I couldn't find anything.
Has anyone else already written a plugin for this, or is there some other kind of trick that I can use to save myself some time? | top |
|
Posted by
| Nick Gammon
Australia (22,982 posts) bio
Forum Administrator |
Date
| Reply #1 on Thu 03 Feb 2011 12:44 AM (UTC) |
Message
| You might be able to do it with the OnPluginScreendraw plugin callback. This is passed the raw text of lines, along with a flag saying whether or not it is planned to be logged.
So you could do HTML logging in the usual way, and then write to a different file in your OnPluginScreendraw function if the "log" flag is set (for the non-coloured version).
http://www.gammon.com.au/scripts/doc.php?general=plugin_callbacks
However there was a problem reported recently with notes which are done in conjunction with "omit from output" where they might be drawn twice.
This wouldn't really apply to you if you just are logging input and output, not notes. Try it and see, it might save you a lot of work. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | top |
|
Posted by
| j0nas
(56 posts) bio
|
Date
| Reply #2 on Mon 07 Feb 2011 12:39 AM (UTC) |
Message
| I'm aware of the bug you're talking about, Nick, it's showing up in my logs as we speak, more or less. ;)
I was hoping that someone might already have written an plugin like this, but I guess not, perhaps I'll be the first. Thanks for the tips as how best to go about it! | 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.
10,541 views.
It is now over 60 days since the last post. This thread is closed.
  Refresh page
top
Quick links:
MUSHclient.
MUSHclient help.
Forum shortcuts.
Posting templates.
Lua modules.
Lua documentation.
Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.