Log formatting issue

Posted by Madnesssoft on Fri 07 Oct 2011 10:12 AM — 7 posts, 26,577 views.

#0
I'm having a little trouble with running the log in HTML, it keeps inserting code like this(ignore the color I just yanked it from the logfile)

</font><font color="#969696">

When it should just be

<font color="#969696">

Any reason why the extra is getting tossed in there? It's strange because it makes the log perfectly once told to start, but after that it flakes out once more things are added in real time and starts adding the extra bit of preamble.

USA #1
It's mostly likely because MUD colors don't have any ending color tag. So in order to end a font color in HTML, it has to force close the font tag.

Example:
&Rred color&Bblue color

Becomes logged as:
<font color="red">red color</font><font color="blue">blue color
#2
Ok, well that would make sense. But I'm on a MUCK, no color is being sent to me, I'm just using color triggers in mushclient to let me notice key things easier. It works perfect like I said if I stop the log, start it again and it takes what is in the buffer and turns it into the htm file, but that's completely overwriting the file, something I don't want in the long run and defeats the purpose of a log.

Also the htm is still readable, it just makes everything really thin lined which is annoying how it can go from WYSIWYG to WTFAILA(what the fuck am I looking at?).
Australia Forum Administrator #3
You should probably add a:


 <font color="white"> 


to the file preamble. That way they are balanced.

Then each line closes the previous font and starts a new one.

Quote:

It works perfect like I said if I stop the log, start it again and it takes what is in the buffer and turns it into the htm file, but that's completely overwriting the file, something I don't want in the long run ...


There is an option to append to the log.
#4
<html>
<body bgcolor="#000000">
<META HTTP-EQUIV="REFRESH" CONTENT="60">
<head>
<title>Log of %N session</title>
</head>
<body>
<table border=0 cellpadding=5 bgcolor="#000000">
<tr><td>
<pre><code><font size=2 face="FixedSys, Lucida Console, Courier New, Courier">

is what my preamble looks like, where should I put it to keep my colors or does that not matter? I also have in the output preamble.

<font color="white">%I:%M</font>
Australia Forum Administrator #5
Madnesssoft said:

is what my preamble looks like, where should I put it to keep my colors or does that not matter?


At the end. Then the preamble ends with an opening font tag, and then each line closes it and opens a new one.
#6
Nice, yeah, that works perfectly now. Thanks!