My current approach has been working really well for outputs that I can capture on the server:
world
proc
output<<(A,target,window)
if(target==world.log)
//This handles world.log << calls properly
..()
world
Error(exception/exception)
..()
//This handles runtime errors properly
The problem is that I can't get invalid command / arg feedback, or messages from stuff like .ping, or "connection died" messages to these other controls.
BYOND provided the means to offload chat and command entry to browser controls between 511 and 516. I can get rudimentary command feedback via something like this:
client
Command(command as command_text)
set instant = 1, hidden = 1
src << output("Invalid command: [html_encode(command)]","console")
The problem is that I have no way to actually check verb accessibility or inspect verb arguments from outside of that verb to make it any deeper than this. I could handroll a whole ass list of commands and their additional help dialogues, and a basic system for marking what args are what, but BYOND already provides more or less the error message that I need. It's just stuck going to the log or the default output (in my case, none).
I think the easiest way to go about this would be to trigger a macro when one of these messages shows up, feeding the entire message that would have been sent to [[*]].
That would allow me to set a macro in my skin, with more or less this command:
LogMessage ".output console:onMessage [[*]]"
I wouldn't need *every* message that hits the log, like runtimes or log messages from the server. Basically just the client-side messages that we can't currently get at with world/Error() and world/operator<<() and the like.