enenra / space-engineers-utilities

A Blender 4.0+ addon to streamline working on assets for Space Engineers.
https://spaceengineers.wiki.gg/wiki/Modding/Tools/Space_Engineers_Utilities
GNU General Public License v3.0
47 stars 12 forks source link

Improved Logging #300

Closed enenra closed 2 years ago

enenra commented 2 years ago

There's some options for improving SEUT logging, especially regarding tracebacks.

Main question is how things can be handled when a traceback breaks the addon without wrapping everything into try+except blocks.

info: https://blender.stackexchange.com/questions/6921/how-to-write-the-output-of-blender-console-out-to-a-file https://blenderartists.org/t/capture-the-last-error/529706/3 https://docs.python.org/3/howto/logging.html https://stackoverflow.com/questions/1278705/when-i-catch-an-exception-how-do-i-get-the-type-file-and-line-number

Could run a continuous loop that checks the last traceback, compares it to the last one it has saved, if it's not the same, print it into the log.