robot_designer_plugin.core.logfile module
This sub package provides logging mechanism for the plugin development.
Blender is not easy to debug (adding an external debugger is planned) such that providing informative
output to a log file is mandatory.
The log file is stored in the path stored in the plugin directory (config.script_path
) in
resources/log.txt
.
An example of a log file:
Logging of operators can be automated with the decorators and base classes in the operators
module.
- robot_designer_plugin.core.logfile.LogFunction(func)[source]
Logging / exception handling decorator for functions (use for draw function for instance).
- Parameters
func – The function to decorate
- Returns
- robot_designer_plugin.core.logfile.core_logger = <Logger Core (INFO)>
Logging object associated with the plugin core. All loggers store to
resources/log.txt
- robot_designer_plugin.core.logfile.export_logger = <Logger Export (INFO)>
Logging object associated with operators. All loggers store to
resources/log.txt
- robot_designer_plugin.core.logfile.gui_logger = <Logger GUI (INFO)>
Logging object associated with the user interface. All loggers store to
resources/log.txt
- robot_designer_plugin.core.logfile.log_callstack(back_trace=False)[source]
Helper function that formats either a (filtered) backtrace or call stack in a string. Blender internals are filtered such that errors in the own code can be detected more easily.
- Parameters
back_trace – If true, the backtrace is returned. Otherwise, the call stack is returned.
- Returns
the formatted call stack/backtrace in a string.
- robot_designer_plugin.core.logfile.operator_logger = <Logger Operators (INFO)>
Logging object associated with operators. All loggers store to
resources/log.txt
- robot_designer_plugin.core.logfile.prop_logger = <Logger Properties (INFO)>
Logging object associated with properties. All loggers store to
resources/log.txt