Logging all script errors

Idea created by vince.menanno on Oct 26, 2015

    Currently if you run a script on server using PSoS or a scheduled script and it hits up against some errors you can look at the error log and see those errors showing up. Problem however is that we have many more desktop or mobile users executing scripts and we need to be able to capture all the errors that occur from anywhere.


    Pro, Go, WD, etc etc


    Ideally one could probably even turn on verbose logging and one could do things like see how long a script took to execute, along with any errors that occurred during the execution. As developers, if we could have access to set the level of logging then we could have it be verbose and we could also troubleshot not just the errors but performance in general.


    Which script steps are taking the longest to complete, which ones are getting errors.


    This is a must especially seeing as we don't have insight into what errors are occurring for Pro and Go. At the very least we should have consistency.


    There are many benefits to why this information would be helpful.


    1 - we would be seeing errors that we don't even know exist or thought would be errors

    2 - we don't have to always write everything defensively... meaning once something works and is in production then it should continue to work. This way our scripts focus on the workflow and not all the possible errors that COULD occur IF something were broken. more concise and easier to read code = less debugging and hopefully more reliability.

    3 - we can be proactive rather than reactive


    It would be great if we also had control over how much information could get logged that would be awesome.


    Thanks - vince