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
➜ 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 (23,158 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.
12,531 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top