Skip to content

Commit

Permalink
setting up minisite
Browse files Browse the repository at this point in the history
  • Loading branch information
rmannibucau committed Jan 8, 2021
1 parent c43365d commit 552df9d
Show file tree
Hide file tree
Showing 5 changed files with 109 additions and 36 deletions.
6 changes: 1 addition & 5 deletions README.adoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
= Yupiik Logging

This repository provides some logging utilities for logging.

For now it mainly provides a Java Util Logging (JUL) LogManager which is graal friendly - you can reconfigure your JUL loggers at runtime - plus some utilities like mor advanced formatters or handlers.

For more information, read xref:yupiik-logging-jul/README.adoc#_yupiik_logging_jul_integration[JUL Integration] documentation.
See link:https://yupiik.github.io/yupiik-logging/.
38 changes: 38 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
<description>Yupiik Logging support</description>
<url>https://www.yupiik.com/</url>

<properties>
<minisite.github-pages.skip>true</minisite.github-pages.skip>
</properties>

<modules>
<module>yupiik-logging-jul</module>
<module>integration-test</module>
Expand Down Expand Up @@ -139,6 +143,40 @@
<scope>compile,runtime</scope>
</configuration>
</plugin>
<plugin>
<!--
render doc locally in a build:
$ mvn yupiik-tools:minisite@doc -N
work on the doc:
$ mvn yupiik-tools:serve-minisite@doc -N
deploy on github pages (clean is important to ensure we don't start from a dirty gh-pages copy):
$ mvn clean yupiik-tools:minisite@doc -N -Dminisite.github-pages.skip=false
-->
<groupId>io.yupiik.maven</groupId>
<artifactId>yupiik-tools-maven-plugin</artifactId>
<version>1.0.2-SNAPSHOT</version>
<executions>
<execution>
<id>doc</id>
<phase>none</phase>
<goals>
<goal>minisite</goal>
</goals>
<configuration>
<logoText>Logging</logoText>
<copyright>Yupiik &amp;copy; / Logging</copyright>
<indexSubTitle>The Yupiik logging helper library.</indexSubTitle>
<siteBase>https://yupiik.github.io/yupiik-logging</siteBase>
<target>${project.build.directory}/${project.artifactId}</target>
<git>
<ignore>${minisite.github-pages.skip}</ignore>
</git>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

Expand Down
39 changes: 39 additions & 0 deletions src/main/minisite/content/graalvm-integration.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
= Java Util Logging (JUL) integration
:minisite-index: 300
:minisite-index-title: GraalVM
:minisite-index-description: How to use it to have reconfigurable JUL/SLF4j loggers.
:minisite-index-icon: fighter-jet

== Usage with GraalVM

Yupiik Logging JUL is integrated with GraalVM native image feature.
To enable it you must set in `native-image` command line the following system property: `-Djava.util.logging.manager=io.yupiik.logging.jul.YupiikLogManager`.
Other required setup is done in the jar and automatically picked up by `native-image`.

NOTE: yupiik-logging-jul will set itself as JUL LogManager during the build time so ensure it does not compete with another logging framework.

Once done you can run with no logging configuration or override it through the standard `java.util.logging.config.file` system property.

== Arthur Integration

To use this module with link:https://geronimo.apache.org/arthur/[Arthur] you can use this configuration:

[source,xml]
----
<plugin> <!-- mvn [package] -Parthur arthur:native-image -e -->
<groupId>org.apache.geronimo.arthur</groupId>
<artifactId>arthur-maven-plugin</artifactId>
<version>1.0.1</version>
<configuration>
<graalVersion>20.3.0.r11</graalVersion>
<main>com.app.YourMain</main>
<graalExtensions> <!-- if you also want slf4j support through JUL -->
<graalExtension>slf4j</graalExtension>
</graalExtensions>
<customOptions> <!-- this is what enables Yupiik JUL support -->
<customOption>-Djava.util.logging.manager=io.yupiik.logging.jul.YupiikLogManager</customOption>
</customOptions>
</configuration>
</plugin>
----

Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
= Yupiik Logging JUL integration
= Java Util Logging (JUL) integration
:minisite-index: 200
:minisite-index-title: JUL Integration
:minisite-index-description: Java Util Logging integration module and features.
:minisite-index-icon: fab fa-java

Java Util Logging integration is provided as part of the artifact:

[source,xml]
----
<dependency>
<groupId>io.yupiik.logging</groupId>
<artifactId>yupiik-logging-jul</artifactId>
<version>${yupiik-logging.version}</version>
</dependency>
----

== Use globally

Expand Down Expand Up @@ -93,15 +108,11 @@ It can be done with this list for example:
</dependency>
----

== Usage with GraalVM
== Sample Configuration Files

Yupiik Logging JUL is integrated with GraalVM native image feature.
To enable it you must set in `native-image` command line the following system property: `-Djava.util.logging.manager=io.yupiik.logging.jul.YupiikLogManager`.
Other required setup is done in the jar and automatically picked up by `native-image`.
As with native JUL `LogManager`, you can configure the runtime logging with the following system property: `-Djava.util.logging.config.file=<path to config file>`.

NOTE: yupiik-loggin-jul will set itself as JUL LogManager during the build time so ensure it does not compete with another logging framework.

Once done you can run with no logging configuration or override it through the standard `java.util.logging.config.file` system property.
NOTE: don't forget `-Djava.util.logging.manager=io.yupiik.logging.jul.YupiikLogManager` too.

Here is a sample configuration switching to JSON logging:

Expand Down Expand Up @@ -135,26 +146,3 @@ And finally a configuration using file output instead of standard one:
.handlers = file
file.formatter = inline
----

== Arthur Integration (GraalVM)

To use this module with link:https://geronimo.apache.org/arthur/[Arthur] you can use this configuration:

[source,xml]
----
<plugin> <!-- mvn [package] -Parthur arthur:native-image -e -->
<groupId>org.apache.geronimo.arthur</groupId>
<artifactId>arthur-maven-plugin</artifactId>
<version>1.0.1</version>
<configuration>
<graalVersion>20.3.0.r11</graalVersion>
<main>com.app.YourMain</main>
<graalExtensions> <!-- if you also want slf4j support through JUL -->
<graalExtension>slf4j</graalExtension>
</graalExtensions>
<customOptions> <!-- this is what enables Yupiik JUL support -->
<customOption>-Djava.util.logging.manager=io.yupiik.logging.jul.YupiikLogManager</customOption>
</customOptions>
</configuration>
</plugin>
----
12 changes: 12 additions & 0 deletions src/main/minisite/content/overview.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
= Yupiik Logging Overview
:minisite-index: 100
:minisite-index-title: Overview
:minisite-index-description: What is Yupiik logging library about.
:minisite-index-icon: highlighter

This project provides some logging utilities.

It mainly provides a Java Util Logging (JUL) LogManager which is graal friendly - you can reconfigure your JUL loggers at runtime - plus some utilities like mor advanced formatters or handlers.

For more information, read xref:jul-integration.adoc#_java_util_logging_jul_integration[JUL Integration] documentation.

0 comments on commit 552df9d

Please sign in to comment.