Skip to content

Commit

Permalink
Improves repository documentation
Browse files Browse the repository at this point in the history
Closes #112
  • Loading branch information
ppkarwasz committed Sep 14, 2024
1 parent a15a744 commit e289887
Show file tree
Hide file tree
Showing 63 changed files with 2,997 additions and 120 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/build-reusable.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
# tag::license[]
#
# Copyright © 2024 Piotr P. Karwasz
# Copyright (C) 2024 Piotr P. Karwasz
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# end::license[]

name: build-reusable

Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
# tag::license[]
#
# Copyright © 2024 Piotr P. Karwasz
# Copyright (C) 2024 Piotr P. Karwasz
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# end::license[]
name: build

on:
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/codeql-analysis.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
# tag::license[]
#
# Copyright © 2024 Piotr P. Karwasz
# Copyright (C) 2024 Piotr P. Karwasz
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# end::license[]
name: "CodeQL"

on:
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/merge-dependabot.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
# tag::license[]
#
# Copyright © 2024 Piotr P. Karwasz
# Copyright (C) 2024 Piotr P. Karwasz
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# end::license[]
name: merge-dependabot

on:
Expand Down
103 changes: 103 additions & 0 deletions distribution/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- tag::license[]
~
~ Copyright © 2024 Piotr P. Karwasz
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ https://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
~
~ end::license[] -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>eu.copernik</groupId>
<artifactId>log4j-plugins-parent</artifactId>
<version>3.0.0-SNAPSHOT</version>
</parent>

<artifactId>copernik-tomcat-log4j</artifactId>
<packaging>pom</packaging>
<name>Copernik.eu extensions for Log4j and Tomcat</name>

<properties>
<maven.deply.skip>true</maven.deply.skip>
<maven.install.skip>true</maven.install.skip>
</properties>

<dependencies>

<dependency>
<groupId>eu.copernik</groupId>
<artifactId>log4j-tomcat</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>eu.copernik</groupId>
<artifactId>tomcat-log4j</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>eu.copernik</groupId>
<artifactId>tomcat-juli-to-log4j</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
</dependency>

<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
</dependency>

<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-layout-template-json</artifactId>
</dependency>

<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-jakarta-web</artifactId>
</dependency>

</dependencies>

<build>
<plugins>

<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>create-distribution</id>
<goals>
<goal>single</goal>
</goals>
<phase>package</phase>
<configuration>
<appendAssemblyId>false</appendAssemblyId>
<descriptors>
<descriptor>src/main/assembly/distribution.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>

</plugins>
</build>

</project>
55 changes: 55 additions & 0 deletions distribution/src/main/assembly/distribution.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- tag::license[]
~
~ Copyright © 2024 Piotr P. Karwasz
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ https://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
~
~ end::license[] -->
<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://maven.apache.org/ASSEMBLY/2.2.0
https://maven.apache.org/xsd/assembly-2.2.0.xsd">
<id>overlay</id>
<formats>
<format>zip</format>
</formats>
<fileSets>
<fileSet>
<directory>src/main/resources</directory>
<outputDirectory>/</outputDirectory>
</fileSet>
</fileSets>
<dependencySets>
<dependencySet>
<!-- All artifacts, except those that require Tomcat -->
<includes>
<include>eu.copernik:*</include>
<include>org.apache.logging.log4j:*</include>
</includes>
<excludes>
<exclude>eu.copernik:tomcat-log4j</exclude>
<exclude>org.apache.logging.log4j:log4j-jakarta-web</exclude>
</excludes>
<outputDirectory>overlay/bin/logging</outputDirectory>
</dependencySet>
<dependencySet>
<includes>
<include>eu.copernik:tomcat-log4j</include>
<include>org.apache.logging.log4j:log4j-jakarta-web</include>
</includes>
<outputDirectory>overlay/lib</outputDirectory>
</dependencySet>
</dependencySets>
</assembly>
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# tag::license[]
#
# Copyright (C) 2024 Piotr P. Karwasz
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# end::license[]
##
# SEPARATE LOGGER CONTEXTS
#
# Enable Tomcat context selector
log4j2.contextSelector = eu.copernik.log4j.tomcat.TomcatContextSelector

# To enable asynchronous loggers with multiple logger contexts:
# 1. Add `com.lmax:disruptor` to `$CATALINA_BASE/bin/logging`.
# 2. Replace the `log4j2.contextSelector` property with:
#
# log4j2.contextSelector = eu.copernik.log4j.tomcat.TomcatAsyncContextSelector

# SINGLE LOGGER CONTEXT
#
# To use a single logger context, replace the `log4j2.contextSelector` property with:
#
# log4j2.contextSelector = org.apache.logging.log4j.core.selector.BasicContextSelector

# To enable asynchronous loggers with a single logger context:
# 1. Add `com.lmax:disruptor` to `$CATALINA_BASE/bin/logging`.
# 2. Replace the `log4j2.contextSelector` property with:
#
# log4j2.contextSelector = org.apache.logging.log4j.core.async.BasicAsyncLoggerContextSelector

# ADDITIONAL CONTEXT DATA
# Uncomment to use additional context data:
#
# log4j2.tomcatContextDataEnabled = true
15 changes: 11 additions & 4 deletions log4j-tomcat/pom.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
<!-- tag::license[]
~
~ Copyright © 2022 Piotr P. Karwasz
~
~ Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -13,9 +14,9 @@
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
~
~ end::license[] -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>eu.copernik</groupId>
Expand Down Expand Up @@ -50,6 +51,12 @@
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api-test</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
Expand Down
Loading

0 comments on commit e289887

Please sign in to comment.