Jump to content
UBot Underground

Error Log, Sent By Customer


Recommended Posts

is there a way i can have my customers send over a error log, lets say the bot crashes or stopped and i need to debug it, is there a way to have the customer send over the log to my email?

Link to post
Share on other sites

There are a lot of ways to do this but I like to take a screenshot of the problem if possible so here is a little command that can do that. You can do a lot with this you can clear the debug folder first to make sure this is the only thing and then have them email it to you. You can zip it up and email it yourself or upload it somewhere but be wary of others possibly getting access to the account.

on load("Bot Loaded") {
    set(#DebugFolder,"{$special folder("Application")}\\Debug\\","Global")
}
navigate("http://network.ubotstudio.com/forum/","Wait")
Debug Log("Navigating to Ubot forums", "true")
define Debug Log(#_what, #_screenshot) {
    comment("Create a folder with the date and time, remove all spaces, slashes and colons")
    set(#thisDebugFolder,$replace regular expression($date,"[\\s\\/:]",$nothing),"Global")
    create folder(#DebugFolder,#thisDebugFolder)
    divider
    comment("Save what was going on to file")
    save to file("{#DebugFolder}{#thisDebugFolder}\\what.txt",#_what)
    comment("If a screenshot is required, save it")
    if($comparison(#_screenshot,"=","true")) {
        then {
            save browser image("{#DebugFolder}{#thisDebugFolder}\\screenshot.png")
        }
        else {
        }
    }
}
Link to post
Share on other sites

Building logging into your bots is an important aspect of ensuring you know what happens when they don't work as expected, and that's why we developed the logging commands! 

Check them out here:

 

http://network.ubotstudio.com/blog/logging-part-1-introduction-to-logging-in-ubot-studio/

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...