Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add error callback via logger configs and add default error callback implementation #214

Closed
stokpop opened this issue Nov 16, 2021 · 1 comment

Comments

@stokpop
Copy link
Contributor

stokpop commented Nov 16, 2021

As a user of the splunk-library-javalogging jar we would like to see and register errors when calls to the Splunk HEC appender fail and for what reason. For instance, when Splunk is not available or cannot parse or accept log events or when timeouts occur.

Create a default error callback that logs to standard error to be used out of the box.

Add the possibility to register an error callback implementation via log4j/logback/java-logger config.
You can do so, for instance via logback.xml, by adding this to the appender xml:

<errorCallback>com.splunk.logging.util.StandardErrorCallback</errorCallback>

Optionally generate stack traces when errors occur.

(Submitted a working PR: #215)

@bparmar-splunk
Copy link
Contributor

HI @stokpop,
I am closing this issue as its related PR is merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants