fixing fixing CARBON-15043 Logging Exceptions when Java Security Manager is enabled