i see many instances where a snippet has debugging information which i think i may be able to show a better way to do it. first of all some background. those of you using send_to_char("debugging message", ch) may not get the correct information always because when you call send_to_char your debugging "info" doesnt get immediately sent to the socket. if you are trying to track down a seg fault(for those of you who dont have or know how to use a good debugger) its kinda painful. if you use the log() function, the output is a bit quicker but unless you are running the game NOT from the autorun script you still have to look at the syslogs to see what your debugging information is. here is what i do.(this can be accomplished one of two ways..) i use the regular printf function for my debugging messages. then when i run the mud, i DONT use the autorun script, i just start it up manually (ie bin/circle 4001 &) (this is unix specific). Then assuming you have your terminal set up correctly, all output is sent directly to the "console" which started the mud. if i then log into my mud from that very same console screen i get the benefit of immediatly seeing any debugging messages i have(and indeed ALL debugging message and all other normal game output which is normally redirected to the syslog) over the years i have found this to be very handy and much quicker than trying to use the log() function.(incindentally, you dont really need to use the log() function anyway, a simple printf will do the same thing because both stderr and stdout are redirected to the syslog.) if you want the mud to keep rebooting while you are debugging, all you have to do is make some mods to the autorun script. just find the place where the script starts up the mud and remove the redirection information will be something like this - bin/circle $FLAGS $PORT >> log/syslog 2>&1 just change it to be bin/circle $FLAGS $PORT and remove all the fgrep stuff below it.(dont forget to change your $PORT too..you dont want to try to run the mud on a port that already has a mud going) thats about it, i'm hoping this will help some of you in your debugging endeavors. i'm not trying to be snooty or condescending. happy new years everybody bill -- reply to bill<@>longboys.net(remove the<>) ...spam avoidance policy in effect. check out www.giftsgalore.com, lots 'o neat stuff there. happy new year +------------------------------------------------------------+ | Ensure that you have read the CircleMUD Mailing List FAQ: | | http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html | +------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/15/00 PST