HTML Logging - Multiple Spaces Ignored

Posted by David Haley on Wed 09 Jul 2003 03:30 PM — 5 posts, 19,199 views.

USA #0
In HTML, when you have more than one space, you need to put it like "   " for three spaces, for example. MUSHclient doesn't seem to do this when outputting in HTML mode... it just prints out the spaces.
USA #1
Since muds are generally in fixed width, the HTML logging assumes that you will use something like <pre>..the log...</pre> to display it correctly. With that tag, everything in between is treated as 'pre-formatted' and the correct number of spaces appear in it. I suspect that the needed tags are not added automatically and that the HTML header you are adding to view the page is also missing this. HTML copy and paste is different, since setting colors requires that the color information be set 'before' starting the preformatted text. Tags are also rendered as typed in such, so any color changes are simply shown as tags, instead of executed when used the wrong way. I don't believe that logging stores the colors, so it doesn't bother to properly transition between the default web browsers use of non-fixed and unformatted text, but instead leaves this up to the person making the log to add.

Imho it would make life a bit easier if mushclient was smart enough to do:

<HTML>
<head>
Stuff from the header section.
</head>
<body>
<pre>
Your actual log.
</pre>
Anything in the footer section.
</body>
</html>

when actually using HTML logging. Instead we have to add all the needed tags in the right places to make it work. You simply missed one. ;)
Canada #2
I use HTML logging. Here's how mine is setup:

File Preamble:

<html>
<head>
<title>%N (%P) [%Y-%b-%d %a]</title>
</head>
<body bgcolor=#DCDCDC>
<font face="FixedSys" size="3">
<pre>
Times (on the left) are %z.
---------------------------------------------------------------------

File Postamble:

%N [%Y-%b-%d %a]
</pre>
</font>
</body>
</html>

Output lines:
Preamble:
%H:%M> 

Commands:
Preamble:
%H:%M> <font color=#FF8040>
Postamble:
</font>

Script Notes:
Preamble:
%H:%M> 

Now, I do some 'fancy' things with mine. I set the background colour to match the one I use on the mud, which is an off-white. I set commands to use the same colour as configured in MUSHclient. (MUSHclient doesn't seem to want to log commands in the command colour).

I notice there is a button on the log configuration screen: Standard HTML preamble\Postamble. I'm sure you could just press that to get the basic stuff you need.

(BTW, I agree with Shadowfyr, you need the <Pre></Pre> tags.)
USA #3
Thanks for the pointers... <pre> is indeed what I wanted.

I'm not sure I want to use the complete HTML pre/postamble, because I use automatic logging. I wouldn't want the logger to close the body/html tags every time I close a session :)

I use this as a preamble:

<html>
 <head>
 <title>Log of %N session</title>
 </head>
<body bgcolor=000000 text=ffffff>
<font face="courier new" size=3>
<pre>

and this as a postamble:

</pre>

And it seems to work just fine.

Thanks again for letting me know the way around this. :)
Australia Forum Administrator #4
It's not really a bug - it is intended to work that way. Rather than cluttering up your log files with thousands of &nbsp; entries - which would make them very tedious to read when you edit the HTML, MUSHclient uses (or allows you to use) the well-documented <pre> ... </pre> feature of HTML which retains existing formatting, line breaks, etc.