Handling Exceptions During Logging

Logging code isn’t properly handling potential exceptions, leading to failure of execution of the main code.

For example:
If Origam.Rule debug level logging is enabled, data structure rule processing fails

It would be great to provide structural solution for this issue.