Skip to content

Commit

Permalink
Deprecate setLoggingEnabled on API clients (#396)
Browse files Browse the repository at this point in the history
jimmyjames authored Jan 20, 2022
1 parent c189dbc commit 5211476
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/java/com/auth0/client/auth/AuthAPI.java
Original file line number Diff line number Diff line change
@@ -155,11 +155,14 @@ public void setTelemetry(Telemetry telemetry) {
}

/**
* @deprecated use the logging configuration available in {@link HttpOptions#setLoggingOptions(LoggingOptions)}
*
* Whether to enable or not the current HTTP Logger for every request and response line, body, and headers.
* <strong>Warning: Enabling logging can leek sensitive information, and should only be done in a controlled, non-production environment.</strong>
*
* @param enabled whether to enable the HTTP logger or not.
*/
@Deprecated
public void setLoggingEnabled(boolean enabled) {
logging.setLevel(enabled ? Level.BODY : Level.NONE);
}
3 changes: 3 additions & 0 deletions src/main/java/com/auth0/client/mgmt/ManagementAPI.java
Original file line number Diff line number Diff line change
@@ -140,11 +140,14 @@ public void setTelemetry(Telemetry telemetry) {
}

/**
* @deprecated use the logging configuration available in {@link HttpOptions#setLoggingOptions(LoggingOptions)}
*
* Whether to enable or not the current HTTP Logger for every request and response line, body, and headers.
* <strong>Warning: Enabling logging can leek sensitive information, and should only be done in a controlled, non-production environment.</strong>
*
* @param enabled whether to enable the HTTP logger or not.
*/
@Deprecated
public void setLoggingEnabled(boolean enabled) {
logging.setLevel(enabled ? Level.BODY : Level.NONE);
}

0 comments on commit 5211476

Please sign in to comment.