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 & Html
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Dhai
(8 posts) Bio
|
Date
| Wed 21 Dec 2005 06:06 AM (UTC) |
Message
| Here's my setup. I have a trigger that matches on the first two lines I get when connecting to my mud. I'm constantly logging, and I prefer logging in Colour & Html, and because of this I can't really use just one file to log to. Instead, I have it so I log to a .html file with a modified os.date() filename, so the "/"'s and ":"'s are replaced with "-"'s.
Anyway.
When I do an OpenLog to a .html file, I don't get any line breaks or anything. Even when I have the "HTML" checkbox in Logging checked. It's also only when I double-click the file (i.e., open it up in Opera or Internet Explorer). If I open up the .html in Notepad or Wordpad, the breaks are still there, and it looks fine (unless I've got the Colour HTML logging on).
Also, the files haven't got the black background I get when having an "Automatically log to this file" file, in HTML.
I have examples of all these situations, and can host them up so you can see what I'm talking about, if necessary.
Thanks. | Top |
|
Posted by
| Nick Gammon
Australia (23,159 posts) Bio
Forum Administrator |
Date
| Reply #1 on Wed 21 Dec 2005 09:30 PM (UTC) |
Message
| It's not clear exactly what the problem is here. You are talking about "not getting" line breaks, but you do if opened in Opera.
Anyway, I am guessing the problem is this:
If you do "auto log" there is a default log file preamble and postamble, that you can get by hitting a button in the log file preferences. Amongst other things, this puts a <pre> tag into the file, which means that lines are shown "as is" including line breaks.
Now with the OpenLog function, it assumed that if you wanted a preamble you would put it there yourself. For example, if you are appending to an existing file you probably don't.
If I am right, you simply need to output the log file preamble, after opening the log file. It is readly available by doing GetInfo:
http://www.gammon.com.au/scripts/doc.php?function=GetInfo
You want selector 11 (log file preamble), and 12 (log file postamble) for when you close the log file.
Simply get that string, and write it to the log file after opening it. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Dhai
(8 posts) Bio
|
Date
| Reply #2 on Wed 21 Dec 2005 10:38 PM (UTC) |
Message
| Great, it's working.
Thanks a lot! | 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,074 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top