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.
 Entire forum ➜ MUSHclient ➜ Plugins ➜ HTML and logging?

HTML and logging?

You need to log onto the forum to reply or create new threads.

  Refresh page


Posted by Remixman   (1 post)  Bio
Date Wed 23 Oct 2024 07:40 PM (UTC)
Message
Hello!

I'm trying to get MUSHclient to log with valid HTML. I've selected to log as HTML, log output, log commands, and log notes; the color is also logged, and world name is written. For preamble, I have Session started at %#c. Similarly, for the postamble, Sessions ends at %#c (I just wanted the times at when the sessions start and end).

The problem seems to be that there's no proper head, body, etc for a browser to interpret. For example, when I open the logfile in a browser, it almost looks like it would in a Notepad with (some) HTML tags. For example, here's a part of the log:

Session started at Monday, October 21, 2024 09:40:56 PM
<br>
Alter Aeon - Monday, October 21, 2024, 9:40 PM<br>
----------------------------------------------<br><br>

<font color="#C0C0C0">Welcome to Alter Aeon, a fantasy adventure game set in a world
</font><font color="#C0C0C0">of swords and sorcery, magic and dragons!
</font>
<font color="#C0C0C0">If you already have a character, enter the name now.
</font><font color="#C0C0C0">If you are new, you must create and name a new character.
</font>
<font color="#C0C0C0">Would you like to create a new character?

Etc, etc. What would you recommend doing to get valid HTML for logs? Also, I'm planning on logging many hundreds of thousands of lines--do you think the built-in logger is down for this, or should another utility be used? Any ideas welcome.

Cheers.
Top

Posted by Nick Gammon   Australia  (23,102 posts)  Bio   Forum Administrator
Date Reply #1 on Wed 23 Oct 2024 08:09 PM (UTC)
Message
In the logging part of the world configuration there is provision for a log file preamble and postamble. There is also a button to insert "Standard HTML preamble/postamble".

Click that.

That will put whatever text you have there at the start, and end, of your log file, turning it into valid HTML.

- Nick Gammon

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

Posted by Nick Gammon   Australia  (23,102 posts)  Bio   Forum Administrator
Date Reply #2 on Wed 23 Oct 2024 08:13 PM (UTC)
Message
Quote:

Also, I'm planning on logging many hundreds of thousands of lines--do you think the built-in logger is down for this, or should another utility be used? Any ideas welcome.


It just writes to a file, appending to it if necessary. It should handle large volumes. I would advise putting the date (but not the time) into the log file name, so you get a new file every day. Or you could make it finer grained by putting the date and hour into the log file name so you get a new file every hour.

The "?" button near the top of the dialog box tells you the special characters you can use for putting dates and times into the log file name. For that matter, you can also put the time onto each line by modifying the "Output lines preamble".

- Nick Gammon

www.gammon.com.au, www.mushclient.com
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.


252 views.

You need to log onto the forum to reply or create new threads.

  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.