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
➜ Bug reports
➜ Logging: postamble putting text on start of the line
Logging: postamble putting text on start of the line
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Scypio
Poland (50 posts) Bio
|
Date
| Mon 18 Jul 2005 11:05 PM (UTC) |
Message
| So, the problem is as stated in the topic - I put some text in the postamble of the output lines (in logging preferences) - namely:
<font color="#000000"><!RL!%H:%M:%S:0></font>
The font color is just to make it invisible for the reader, it's supposed to help with some real-time-log-reading application that my friend is developing.
However, the log produced has those time tags at start of the line, not at the end where I expected them to be. I played a bit and put the tags in preamble and got exactly the same result. | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #1 on Sat 23 Jul 2005 04:32 AM (UTC) |
Message
| I can't reproduce this. I put text in the postamble and it appears at the end of the line. What version of MUSHclient are you using? |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Scypio
Poland (50 posts) Bio
|
Date
| Reply #2 on Sat 23 Jul 2005 05:23 AM (UTC) |
Message
| Noticed it on 3.66. But on the other computer, on 3.65, it seems the same. | Top |
|
Posted by
| Scypio
Poland (50 posts) Bio
|
Date
| Reply #3 on Sat 23 Jul 2005 05:33 AM (UTC) |
Message
| I uploaded a screenshot of my logging settings:
http://show.imagehosting.us/showimg.php?file=nouser_477/T0_-1_477919.jpg&picid=477919&uid=0
The log of:
g
A cozy tent(s and n)
An empty bottle [6]
A wooden ballot box [1 vote]
The board of Gondor's Vengeance [25 notes]
south
west
By a small campfire(se, s, sw, w, n and e)
A piece of jerky
A jute bag
A flag
An empty keg
An empty bottle [4]
HP:230 EP:230 - >
looks like this:
<!RL!06:45:26:0>g
A cozy tent(s and n)
<!RL!06:45:29:0> An empty bottle [6]
<!RL!06:45:29:0> A wooden ballot box [1 vote]
<!RL!06:45:29:0> The board of Gondor's Vengeance [25 notes]
<!RL!06:45:29:0>south
west
By a small campfire(se, s, sw, w, n and e)
<!RL!06:45:29:0> A piece of jerky
<!RL!06:45:29:0> A jute bag
<!RL!06:45:29:0> A flag
<!RL!06:45:29:0> An empty keg
<!RL!06:45:29:0> An empty bottle [4]
<!RL!06:45:29:0>HP:230 EP:230 - >
| Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #4 on Sat 23 Jul 2005 07:22 AM (UTC) |
Message
| OK, this is HTML logging. What I think is happening is that the conversion that fixes up text from "straight" text into HTML (eg. > becomes > ) is also converting the newline into <BR>.
So, what you are getting is:
(preamble) (line converted) <br> (postamble) (newline character)
When you view this in HTML it looks like the postamble is on a new line.
A couple of workarounds:
- Put the time at the start of the line
- Make a trigger to match every line and log them yourself with some scripting, to get it the exact way you want.
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Scypio
Poland (50 posts) Bio
|
Date
| Reply #5 on Sat 23 Jul 2005 10:37 AM (UTC) |
Message
| Ok, so I made this plugin for this, just wondering whether I didn't forget anything, so if you feel like wasting 5 mins of your life you could take a look at that and tell me if it's ok (including just the script not full plugin for obvious reasons).
function RealLog(tname, output, wilds)
{
var LineNumber=GetLinesInBufferCount();
var LineText="";
var StyleText="";
var style=0;
var styles=0;
styles=GetLineInfo (LineNumber, 11);
for (style = 1; style<=styles; style++)
{
StyleText = '<font color="' + RGBColourToName(GetStyleInfo (LineNumber, style, 14)) + '">';
StyleText += GetStyleInfo (LineNumber, style, 1)
if (GetStyleInfo (LineNumber, style, 9))
{
StyleText = "<u>" + StyleText + "</u>"
}
LineText += StyleText;
}
var d, RL='<font color="#000000"><!RL!';
var c = ":";
d=new Date();
RL += d.getHours() + c;
RL += d.getMinutes() + c;
RL += d.getSeconds() + c;
RL += d.getMilliseconds();
RL += ">";
WriteLog (LineText + " " + RL);
}
| Top |
|
Posted by
| Grim
(2 posts) Bio
|
Date
| Reply #6 on Thu 04 Aug 2005 08:39 PM (UTC) |
Message
| heh. I can see instead GV GH! | 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.
19,385 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top