Skip to content

Commit

Permalink
Move from Javax JSON to Jakarta JSON (#11)
Browse files Browse the repository at this point in the history
Moves from the old Jakarta EE 8/9 namespaces to Jakarta EE 10.
  • Loading branch information
benkard authored Mar 24, 2023
2 parents d979a7a + 195c267 commit 3d5479a
Show file tree
Hide file tree
Showing 14 changed files with 40 additions and 40 deletions.
28 changes: 14 additions & 14 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ If you are using Maven:
<dependency>
<groupId>eu.mulk.quarkus-googlecloud-jsonlogging</groupId>
<artifactId>quarkus-googlecloud-jsonlogging</artifactId>
<version>5.0.0</version>
<version>6.0.0</version>
</dependency>
</dependencies>
Expand All @@ -59,7 +59,7 @@ If you are using Gradle:
[source,groovy]
----
dependencies {
implementation("eu.mulk.quarkus-googlecloud-jsonlogging:quarkus-googlecloud-jsonlogging:5.0.0")
implementation("eu.mulk.quarkus-googlecloud-jsonlogging:quarkus-googlecloud-jsonlogging:6.0.0")
}
----

Expand Down Expand Up @@ -90,7 +90,7 @@ If you are using Maven:
<dependency>
<groupId>eu.mulk.quarkus-googlecloud-jsonlogging</groupId>
<artifactId>quarkus-googlecloud-jsonlogging-core</artifactId>
<version>5.0.0</version>
<version>6.0.0</version>
</dependency>
</dependencies>
Expand All @@ -101,7 +101,7 @@ If you are using Gradle:
[source,groovy]
----
dependencies {
implementation("eu.mulk.quarkus-googlecloud-jsonlogging:quarkus-googlecloud-jsonlogging-core:5.0.0")
implementation("eu.mulk.quarkus-googlecloud-jsonlogging:quarkus-googlecloud-jsonlogging-core:6.0.0")
}
----

Expand All @@ -121,7 +121,7 @@ JBoss Log Manager as the back end for SLF4J:
<dependency>
<groupId>eu.mulk.quarkus-googlecloud-jsonlogging</groupId>
<artifactId>quarkus-googlecloud-jsonlogging-core</artifactId>
<version>5.0.0</version>
<version>6.0.0</version>
</dependency>
<dependency>
Expand Down Expand Up @@ -178,28 +178,28 @@ Logging unstructured data requires no code changes. All logs are
automatically converted to Google-Cloud-Logging-compatible JSON.

Structured data can be logged in one of 3 different ways: by passing
https://javadocs.dev/eu.mulk.quarkus-googlecloud-jsonlogging/quarkus-googlecloud-jsonlogging-core/5.0.0/eu.mulk.quarkus.googlecloud.jsonlogging.core/eu/mulk/quarkus/googlecloud/jsonlogging/Label.html[Label]s
https://javadocs.dev/eu.mulk.quarkus-googlecloud-jsonlogging/quarkus-googlecloud-jsonlogging-core/6.0.0/eu.mulk.quarkus.googlecloud.jsonlogging.core/eu/mulk/quarkus/googlecloud/jsonlogging/Label.html[Label]s
and
https://javadocs.dev/eu.mulk.quarkus-googlecloud-jsonlogging/quarkus-googlecloud-jsonlogging-core/5.0.0/eu.mulk.quarkus.googlecloud.jsonlogging.core/eu/mulk/quarkus/googlecloud/jsonlogging/StructuredParameter.html[StructuredParameter]s
https://javadocs.dev/eu.mulk.quarkus-googlecloud-jsonlogging/quarkus-googlecloud-jsonlogging-core/6.0.0/eu.mulk.quarkus.googlecloud.jsonlogging.core/eu/mulk/quarkus/googlecloud/jsonlogging/StructuredParameter.html[StructuredParameter]s
as parameters to individual log entries, by supplying
https://javadocs.dev/eu.mulk.quarkus-googlecloud-jsonlogging/quarkus-googlecloud-jsonlogging-core/5.0.0/eu.mulk.quarkus.googlecloud.jsonlogging.core/eu/mulk/quarkus/googlecloud/jsonlogging/LabelProvider.html[LabelProvider]s
https://javadocs.dev/eu.mulk.quarkus-googlecloud-jsonlogging/quarkus-googlecloud-jsonlogging-core/6.0.0/eu.mulk.quarkus.googlecloud.jsonlogging.core/eu/mulk/quarkus/googlecloud/jsonlogging/LabelProvider.html[LabelProvider]s
and
https://javadocs.dev/eu.mulk.quarkus-googlecloud-jsonlogging/quarkus-googlecloud-jsonlogging-core/5.0.0/eu.mulk.quarkus.googlecloud.jsonlogging.core/eu/mulk/quarkus/googlecloud/jsonlogging/StructuredParameterProvider.html[StructuredParameterProvider]s,
https://javadocs.dev/eu.mulk.quarkus-googlecloud-jsonlogging/quarkus-googlecloud-jsonlogging-core/6.0.0/eu.mulk.quarkus.googlecloud.jsonlogging.core/eu/mulk/quarkus/googlecloud/jsonlogging/StructuredParameterProvider.html[StructuredParameterProvider]s,
or by using the Mapped Diagnostic Context.


=== Using Label and StructuredParameter

Instances of
https://javadocs.dev/eu.mulk.quarkus-googlecloud-jsonlogging/quarkus-googlecloud-jsonlogging-core/5.0.0/eu.mulk.quarkus.googlecloud.jsonlogging.core/eu/mulk/quarkus/googlecloud/jsonlogging/Label.html[Label]
https://javadocs.dev/eu.mulk.quarkus-googlecloud-jsonlogging/quarkus-googlecloud-jsonlogging-core/6.0.0/eu.mulk.quarkus.googlecloud.jsonlogging.core/eu/mulk/quarkus/googlecloud/jsonlogging/Label.html[Label]
and
https://javadocs.dev/eu.mulk.quarkus-googlecloud-jsonlogging/quarkus-googlecloud-jsonlogging-core/5.0.0/eu.mulk.quarkus.googlecloud.jsonlogging.core/eu/mulk/quarkus/googlecloud/jsonlogging/StructuredParameter.html[StructuredParameter]
https://javadocs.dev/eu.mulk.quarkus-googlecloud-jsonlogging/quarkus-googlecloud-jsonlogging-core/6.0.0/eu.mulk.quarkus.googlecloud.jsonlogging.core/eu/mulk/quarkus/googlecloud/jsonlogging/StructuredParameter.html[StructuredParameter]
can be passed as log parameters to the `*f` family of logging
functions on JBoss Logging's
https://docs.jboss.org/jbosslogging/latest/org/jboss/logging/Logger.html[Logger].

Simple key–value pairs are represented by
https://javadocs.dev/eu.mulk.quarkus-googlecloud-jsonlogging/quarkus-googlecloud-jsonlogging-core/5.0.0/eu.mulk.quarkus.googlecloud.jsonlogging.core/eu/mulk/quarkus/googlecloud/jsonlogging/KeyValueParameter.html[KeyValueParameter].
https://javadocs.dev/eu.mulk.quarkus-googlecloud-jsonlogging/quarkus-googlecloud-jsonlogging-core/6.0.0/eu.mulk.quarkus.googlecloud.jsonlogging.core/eu/mulk/quarkus/googlecloud/jsonlogging/KeyValueParameter.html[KeyValueParameter].

**Example:**

Expand Down Expand Up @@ -234,9 +234,9 @@ Result:
=== Using LabelProvider and StructuredParameterProvider

Any CDI beans that implement
https://javadocs.dev/eu.mulk.quarkus-googlecloud-jsonlogging/quarkus-googlecloud-jsonlogging-core/5.0.0/eu.mulk.quarkus.googlecloud.jsonlogging.core/eu/mulk/quarkus/googlecloud/jsonlogging/LabelProvider.html[LabelProvider]
https://javadocs.dev/eu.mulk.quarkus-googlecloud-jsonlogging/quarkus-googlecloud-jsonlogging-core/6.0.0/eu.mulk.quarkus.googlecloud.jsonlogging.core/eu/mulk/quarkus/googlecloud/jsonlogging/LabelProvider.html[LabelProvider]
and
https://javadocs.dev/eu.mulk.quarkus-googlecloud-jsonlogging/quarkus-googlecloud-jsonlogging-core/5.0.0/eu.mulk.quarkus.googlecloud.jsonlogging.core/eu/mulk/quarkus/googlecloud/jsonlogging/StructuredParameterProvider.html[StructuredParameterProvider]
https://javadocs.dev/eu.mulk.quarkus-googlecloud-jsonlogging/quarkus-googlecloud-jsonlogging-core/6.0.0/eu.mulk.quarkus.googlecloud.jsonlogging.core/eu/mulk/quarkus/googlecloud/jsonlogging/StructuredParameterProvider.html[StructuredParameterProvider]
are discovered at build time and consulted to provide labels and
parameters for each message that is logged. This can be used to
provide contextual information such as tracing and request IDs stored
Expand Down
6 changes: 3 additions & 3 deletions core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ SPDX-License-Identifier: LGPL-3.0-or-later
<parent>
<groupId>eu.mulk.quarkus-googlecloud-jsonlogging</groupId>
<artifactId>quarkus-googlecloud-jsonlogging-parent</artifactId>
<version>5.0.1-SNAPSHOT</version>
<version>6.0.0-SNAPSHOT</version>
</parent>

<artifactId>quarkus-googlecloud-jsonlogging-core</artifactId>
Expand All @@ -30,8 +30,8 @@ SPDX-License-Identifier: LGPL-3.0-or-later
<artifactId>smallrye-common-constraint</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>jakarta.json</artifactId>
<groupId>org.eclipse.parsson</groupId>
<artifactId>parsson</artifactId>
</dependency>
</dependencies>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.Objects;
import javax.json.Json;
import javax.json.JsonObjectBuilder;
import javax.json.JsonValue;
import jakarta.json.Json;
import jakarta.json.JsonObjectBuilder;
import jakarta.json.JsonValue;

/**
* A simple single key–value pair forming a {@link StructuredParameter}.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
import java.time.Instant;
import java.util.List;
import java.util.Map;
import javax.json.Json;
import javax.json.JsonObject;
import javax.json.JsonObjectBuilder;
import jakarta.json.Json;
import jakarta.json.JsonObject;
import jakarta.json.JsonObjectBuilder;

/**
* A JSON log entry compatible with Google Cloud Logging.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

package eu.mulk.quarkus.googlecloud.jsonlogging;

import javax.json.JsonObjectBuilder;
import jakarta.json.JsonObjectBuilder;

/**
* A structured parameter usable as logging payload.
Expand Down
2 changes: 1 addition & 1 deletion deployment/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ SPDX-License-Identifier: LGPL-3.0-or-later
<parent>
<groupId>eu.mulk.quarkus-googlecloud-jsonlogging</groupId>
<artifactId>quarkus-googlecloud-jsonlogging-parent</artifactId>
<version>5.0.1-SNAPSHOT</version>
<version>6.0.0-SNAPSHOT</version>
</parent>

<artifactId>quarkus-googlecloud-jsonlogging-deployment</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion examples/quarkus/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
<parent>
<groupId>eu.mulk.quarkus-googlecloud-jsonlogging</groupId>
<artifactId>quarkus-googlecloud-jsonlogging-parent</artifactId>
<version>5.0.0</version>
<version>6.0.0</version>
</parent>

<artifactId>quarkus-googlecloud-jsonlogging-quarkus-example</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
import eu.mulk.quarkus.googlecloud.jsonlogging.StructuredParameter;
import eu.mulk.quarkus.googlecloud.jsonlogging.StructuredParameterProvider;
import io.quarkus.arc.Unremovable;
import jakarta.inject.Singleton;
import java.util.concurrent.ThreadLocalRandom;
import javax.inject.Singleton;

@Singleton
@Unremovable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@

import eu.mulk.quarkus.googlecloud.jsonlogging.KeyValueParameter;
import eu.mulk.quarkus.googlecloud.jsonlogging.Label;
import javax.annotation.PostConstruct;
import javax.enterprise.context.ApplicationScoped;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import jakarta.annotation.PostConstruct;
import jakarta.enterprise.context.ApplicationScoped;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.Produces;
import org.jboss.logging.Logger;
import org.jboss.logging.MDC;

Expand Down
4 changes: 2 additions & 2 deletions examples/spring-boot/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ SPDX-License-Identifier: GPL-3.0-or-later
<parent>
<groupId>eu.mulk.quarkus-googlecloud-jsonlogging</groupId>
<artifactId>quarkus-googlecloud-jsonlogging-parent</artifactId>
<version>5.0.0</version>
<version>6.0.0</version>
</parent>

<artifactId>quarkus-googlecloud-jsonlogging-spring-boot-example</artifactId>
<name>Quarkus Google Cloud JSON Logging Extension - Spring Boot Example</name>

<properties>
<spring-boot.version>2.7.3</spring-boot.version>
<spring-boot.version>3.0.4</spring-boot.version>
</properties>

<dependencyManagement>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import eu.mulk.quarkus.googlecloud.jsonlogging.KeyValueParameter;
import eu.mulk.quarkus.googlecloud.jsonlogging.Label;
import javax.annotation.PostConstruct;
import jakarta.annotation.PostConstruct;
import org.jboss.logging.Logger;
import org.jboss.logging.MDC;
import org.springframework.web.bind.annotation.GetMapping;
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ SPDX-License-Identifier: LGPL-3.0-or-later
<modelVersion>4.0.0</modelVersion>

<groupId>eu.mulk.quarkus-googlecloud-jsonlogging</groupId>
<version>5.0.1-SNAPSHOT</version>
<version>6.0.0-SNAPSHOT</version>

<artifactId>quarkus-googlecloud-jsonlogging-parent</artifactId>
<packaging>pom</packaging>
Expand Down Expand Up @@ -72,7 +72,7 @@ SPDX-License-Identifier: LGPL-3.0-or-later
<spotless-plugin.version>2.35.0</spotless-plugin.version>
<surefire-plugin.version>3.0.0</surefire-plugin.version>

<quarkus.version>2.16.5.Final</quarkus.version>
<quarkus.version>3.0.0.Beta1</quarkus.version>
</properties>

<distributionManagement>
Expand Down
2 changes: 1 addition & 1 deletion runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ SPDX-License-Identifier: LGPL-3.0-or-later
<parent>
<groupId>eu.mulk.quarkus-googlecloud-jsonlogging</groupId>
<artifactId>quarkus-googlecloud-jsonlogging-parent</artifactId>
<version>5.0.1-SNAPSHOT</version>
<version>6.0.0-SNAPSHOT</version>
</parent>

<artifactId>quarkus-googlecloud-jsonlogging</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
* <dependency>
* <groupId>eu.mulk.quarkus-googlecloud-jsonlogging</groupId>
* <artifactId>quarkus-googlecloud-jsonlogging</artifactId>
* <version>5.0.0</version>
* <version>6.0.0</version>
* </dependency>
*
* ...
Expand All @@ -59,7 +59,7 @@
* dependencies {
* // ...
*
* implementation("eu.mulk.quarkus-googlecloud-jsonlogging:quarkus-googlecloud-jsonlogging:5.0.0")
* implementation("eu.mulk.quarkus-googlecloud-jsonlogging:quarkus-googlecloud-jsonlogging:6.0.0")
*
* // ...
* }
Expand Down

0 comments on commit 3d5479a

Please sign in to comment.