Load providers registered through the ServiceLoader mechanism.
Change-Id: I392e78b34c8330e9b4c06d57b1423ca552ba6fc1
diff --git a/example/src/main/java/eu/mulk/quarkus/googlecloud/jsonlogging/example/RandomNumberParameterProvider.java b/example/src/main/java/eu/mulk/quarkus/googlecloud/jsonlogging/example/RandomNumberParameterProvider.java
new file mode 100644
index 0000000..7e4158c
--- /dev/null
+++ b/example/src/main/java/eu/mulk/quarkus/googlecloud/jsonlogging/example/RandomNumberParameterProvider.java
@@ -0,0 +1,14 @@
+package eu.mulk.quarkus.googlecloud.jsonlogging.example;
+
+import eu.mulk.quarkus.googlecloud.jsonlogging.KeyValueParameter;
+import eu.mulk.quarkus.googlecloud.jsonlogging.StructuredParameter;
+import eu.mulk.quarkus.googlecloud.jsonlogging.StructuredParameterProvider;
+import java.util.concurrent.ThreadLocalRandom;
+
+public class RandomNumberParameterProvider implements StructuredParameterProvider {
+
+ @Override
+ public StructuredParameter getParameter() {
+ return KeyValueParameter.of("randomNumber", ThreadLocalRandom.current().nextInt());
+ }
+}
diff --git a/example/src/main/resources/META-INF/services/eu.mulk.quarkus.googlecloud.jsonlogging.StructuredParameterProvider b/example/src/main/resources/META-INF/services/eu.mulk.quarkus.googlecloud.jsonlogging.StructuredParameterProvider
new file mode 100644
index 0000000..c0017e6
--- /dev/null
+++ b/example/src/main/resources/META-INF/services/eu.mulk.quarkus.googlecloud.jsonlogging.StructuredParameterProvider
@@ -0,0 +1 @@
+eu.mulk.quarkus.googlecloud.jsonlogging.example.RandomNumberParameterProvider