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

fix: update how debug logging works #174

Merged
merged 4 commits into from
Jun 28, 2024
Merged

fix: update how debug logging works #174

merged 4 commits into from
Jun 28, 2024

Conversation

nicklasl
Copy link
Member

Only logged invocation coming from the SDK that matches the logging level defined by the customer will be printed to Logcat.

The idea here is to have the customer supply the lowest level that they want to get logs for -- they would do that in the create function where we now default to LoggingLevel.WARN.

The SDK is then opinionated about which level to log different things on, for example:

    override fun logEvent(action: String, event: EngineEvent) {
        debug("[$action] $event")
    }
    // and
    override fun logContext(context: Map<String, ConfidenceValue>) {
        verbose(context.toString())
    }

Warnings and errors can contain message from a throwable.

@nicklasl nicklasl marked this pull request as ready for review June 27, 2024 08:50
@nicklasl
Copy link
Member Author

Note to self: Don't forget to also update the Readme docs.

@nicklasl nicklasl merged commit bd79fad into main Jun 28, 2024
2 checks passed
@nicklasl nicklasl deleted the debuglogger-updates branch June 28, 2024 05:16
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.

2 participants