TheBigWeb 40 Posted August 15, 2010 Report Share Posted August 15, 2010 Hi guys, I have put together a library which I think you might find useful. It allows you to create log files for your uBots. Here are the features: - * Date & Time recorded when the log starts* Date & Time recorded per log entry* Create different sections within the log (Great for seperating different actions within the bot)* Display the log file to the user (either at the end or just call the 'display' function anytime you want to show the log (great way to show each step of your bot)* The log can be as detailed as you want it. Just show a summary at the end or log every thing thats happening! Here is a screenshot of the output of a small proxy bot I was playing with: - Here is a breif description of the functions: - start - Must be called first, creates the log file and adds start time & dateheader - Creates a new section with the log file. Just provide the title of the sectionwrite - Writes a new log entry. This can be anything and as detailed as you wishdisplay - Displays the log file within the browser window. Can be called any time to show progress or at the endstop - Closes the log file and and adds time & date when finished This is version 1.0. Please let me know if there are any bugs. My next version will allow you to output the log to html on the fly. Here is the library: - ulib_logfile.ubot 2 Quote Link to post Share on other sites
IRobot 43 Posted August 15, 2010 Report Share Posted August 15, 2010 Thanks for sharing. Very useful to call when debugging/checking values in a script. Quote Link to post Share on other sites
pftg4 102 Posted August 15, 2010 Report Share Posted August 15, 2010 Wow thanks man love that i also write log files but nothing so advanced Pftg4 Quote Link to post Share on other sites
Praney Behl 314 Posted August 15, 2010 Report Share Posted August 15, 2010 Hey this great, will be very helpful while debugging. Cheers !! Praney Quote Link to post Share on other sites
pftg4 102 Posted August 15, 2010 Report Share Posted August 15, 2010 hi TheBigWebBot shouldn't this have a save to file in every sub after add to list or the log file doesn't get written untill the end of the bot which means if there is a problem running the bot the log file will not get written unless i have missed something Pftg4 Quote Link to post Share on other sites
TheBigWeb 40 Posted August 15, 2010 Author Report Share Posted August 15, 2010 hi TheBigWebBot shouldn't this have a save to file in every sub after add to list or the log file doesn't get written untill the end of the bot which means if there is a problem running the bot the log file will not get written unless i have missed something Pftg4 Hi, thanks for the comment! Thats probably a good idea! Just made the changes and updated the library. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.