Skip to content
Snippets Groups Projects
Commit 2f43ad2b authored by OZGCloud's avatar OZGCloud
Browse files

Log Environment variables for debugging

parent 3a4fbcff
Branches
Tags
No related merge requests found
...@@ -3,6 +3,8 @@ package de.itvsh.kop.user.sync; ...@@ -3,6 +3,8 @@ package de.itvsh.kop.user.sync;
import javax.enterprise.context.ApplicationScoped; import javax.enterprise.context.ApplicationScoped;
import javax.inject.Inject; import javax.inject.Inject;
import org.eclipse.microprofile.config.inject.ConfigProperty;
import io.quarkus.scheduler.Scheduled; import io.quarkus.scheduler.Scheduled;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
...@@ -15,8 +17,18 @@ public class SyncScheduler { ...@@ -15,8 +17,18 @@ public class SyncScheduler {
@Inject @Inject
LockService syncLockService; LockService syncLockService;
@ConfigProperty(name = "quarkus.mongodb.connection-string")
String mongodbConnectioString;
@ConfigProperty(name = "quarkus.mongodb.database")
String mongodbDatabase;
@Scheduled(cron = "{kop.keycloak.sync.cron}") @Scheduled(cron = "{kop.keycloak.sync.cron}")
public void start() { public void start() {
LOG.info("Environment variables(Key-Value):");
LOG.info("----------------------------");
LOG.info("quarkus.mongodb.connection-string: ", mongodbConnectioString);
LOG.info("quarkus.mongodb.database: ", mongodbDatabase);
if (syncLockService.isNotLocked()) { if (syncLockService.isNotLocked()) {
syncService.sync(); syncService.sync();
} else { } else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment