[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Suggestions
. . -> [Subject]  Redirecting trace output?

Redirecting trace output?

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by Mudguy   (4 posts)  [Biography] bio
Date Wed 03 Aug 2005 02:37 AM (UTC)
Message
Due to a variety of reasons (spam, infinite loops with OnPluginPartialLine, etc), I am unable to use trace in situations where my triggers, aliases and scripts are under real pressure, and actually break. And the idea struck me: specifying a function other than world.Note for the trace data to be sent to. Ie, in Python:

debug_log = file('C:/Program Files/MUSHclient/logs/debug_log.txt', 'w')

world.TraceDestination = debug_log.write
world.Trace = True



Altarnatively, if for whatever reason this is impractical, an OnPluginTrigger/AliasMatch for debugging would be a great boon, and vastly preferable to putting an equivalent bit of code in all my triggers and aliases.
[Go to top] top

Posted by Nick Gammon   Australia  (23,016 posts)  [Biography] bio   Forum Administrator
Date Reply #1 on Thu 04 Aug 2005 07:45 AM (UTC)
Message
That's quite a nice idea. I'll look at making a trace callback, which if present will override the default of writing to the output window. Then you can output to screen, filter, write to disk, notepad window, or whatever.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Nick Gammon   Australia  (23,016 posts)  [Biography] bio   Forum Administrator
Date Reply #2 on Fri 14 Oct 2005 10:53 PM (UTC)
Message
Added to version 3.67. There is now a plugin callback OnPluginTrace.

In there you can choose to write to a file, append to notepad, or take other actions (like, conditionally write to a file).

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] 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.


9,543 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]