Skip to content

handleError when Splunk server is unresponsive #28

Description

@gmontamat

When you log anything using this handler and the Splunk server is down or unreachable, an Exception is raised and has to be handled properly instead of just printing the traceback.

logging.raiseExceptions = False doesn't change this behavior if I need to ignore these errors.

For example, when I disconnect from the VPN with access to the Splunk server, set raiseExceptions to False and run my code I get:

[SplunkHandler] Exception in Splunk logging handler: HTTPSConnectionPool(host='<hidden>', port=8088): Max retries exceeded with url: /services/collector (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7fb476f32048>: Failed to establish a new connection: [Errno -2] Name or service not known',))

I'd use the logging.Handler.handleError method if possible in the emit method.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions