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 option to print debug logs in JSON format #187

Merged
merged 1 commit into from
Sep 20, 2024

Conversation

cconlon
Copy link
Member

@cconlon cconlon commented Apr 10, 2024

This PR adds a new System property (wolfjsse.debugFormat) which can be set to JSON to output all debug log messages in JSON format. This can be helpful when logs need to be fed into tools such as DataDog.

To enable, set the System property at runtime or on the command line:

System.setProperty("wolfjsse.debug", "true");
System.setProperty("wolfjsse.debugFormat", "JSON");
-Dwolfjsse.debug=true -Dwolfjsse.debugFormat=JSON

This will cause all log messages to be output in a JSON format like so:

{
    "@timestamp": "2024-04-05 11:13:07.193",
    "level": "INFO",
    "logger_name": "wolfJSSE",
    "message": "[ WolfSSLTrustManager] entered engineInit()",
    "thread_name": "main",:
    "thread_id": "1"
}

@cconlon cconlon self-assigned this Apr 10, 2024
@JacobBarthelmeh JacobBarthelmeh merged commit 370ada7 into wolfSSL:master Sep 20, 2024
35 checks passed
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

Successfully merging this pull request may close these issues.

3 participants