Skip to content
Snippets Groups Projects
Commit 55ef4030 authored by Martin's avatar Martin
Browse files

adjust logging

parent 74a8af1c
Branches
No related tags found
No related merge requests found
...@@ -47,12 +47,12 @@ class KeycloakClientRemoteService { ...@@ -47,12 +47,12 @@ class KeycloakClientRemoteService {
public void updateClient(ClientRepresentation client, String realm) { public void updateClient(ClientRepresentation client, String realm) {
try { try {
System.out.println("UPDATE CLIENT..."); LOG.debug("UPDATE CLIENT...");
System.out.println("Realm: " + realm); LOG.debug("Realm: {}", realm);
System.out.println("Client: " + new ObjectMapper().writeValueAsString(client)); LOG.debug("Client: {}", new ObjectMapper().writeValueAsString(client));
} catch (JsonProcessingException e) { } catch (JsonProcessingException e) {
System.out.println("Error parsing :("); LOG.debug("UPDATE CLIENT ERROR parsing :(");
} }
getClientResource(realm, client.getId()).update(client); getClientResource(realm, client.getId()).update(client);
} }
......
...@@ -37,7 +37,9 @@ import com.fasterxml.jackson.databind.ObjectMapper; ...@@ -37,7 +37,9 @@ import com.fasterxml.jackson.databind.ObjectMapper;
import de.ozgcloud.operator.keycloak.KeycloakException; import de.ozgcloud.operator.keycloak.KeycloakException;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2;
@Log4j2
@RequiredArgsConstructor @RequiredArgsConstructor
@Component @Component
class KeycloakRealmRemoteService { class KeycloakRealmRemoteService {
...@@ -54,10 +56,11 @@ class KeycloakRealmRemoteService { ...@@ -54,10 +56,11 @@ class KeycloakRealmRemoteService {
public void updateRealm(RealmRepresentation realm) { public void updateRealm(RealmRepresentation realm) {
try { try {
System.out.println("UPDATE REALM..."); LOG.debug("UPDATE REALM...");
System.out.println("Realm: " + new ObjectMapper().writeValueAsString(realm)); LOG.debug("Realm: {}", new ObjectMapper().writeValueAsString(realm));
} catch (JsonProcessingException e) { } catch (JsonProcessingException e) {
System.out.println("Error parsing :("); LOG.debug("UPDATE REALM ERROR parsing :(");
} }
keycloak.realm(realm.getRealm()).update(realm); keycloak.realm(realm.getRealm()).update(realm);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment