world.TellLog

Posted by Tsunami on Sun 04 Feb 2007 08:17 PM — 5 posts, 22,935 views.

USA #0
Right now there is the world.WriteLog function, but this appends a newline on the end of whatever you provide. Could we have a function which doesn't do that? Specifically, I'd like to prepend timestamps to my prompt line, but only in my log, not on screen. Thanks -Tsunami
Australia Forum Administrator #1
Can't you just do this?

  • Capture prompts in a trigger
  • Omit from log (so it isn't logged automatically)
  • Prepend the timestamp, add in the prompt, and then do a WriteLog of the resulting string.

USA #2
Doh.
USA #3
Actually, while I'll be using that idea, it is quite difficult to implement HTML logging with it. You have to change all the style information into the relevant HTML, neh?
Australia Forum Administrator #4
Well, you would, but you can use this to help you:

http://www.gammon.com.au/scripts/doc.php?function=FixupHTML

For each style run in the line you output the appropriate HTML to change colours (use the existing logging for a guide) and then use FixupHTML on the text part.