Skip to content

Commit

Permalink
Merge branch 'release/27.x'
Browse files Browse the repository at this point in the history
* release/27.x:
  #3932 - Upgrade dependencies
  #3953 - Switch core footer items to auto-configuration
  #3951 - Lots of errors and warnings from logging system during startup
  • Loading branch information
reckart committed Apr 18, 2023
2 parents 1dfa9cb + bf53e05 commit fa61575
Show file tree
Hide file tree
Showing 8 changed files with 51 additions and 27 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="WARN" packages="de.tudarmstadt.ukp">
<Configuration status="WARN">
<properties>
<SpringProfile name="!app &amp; !cli"> <!-- While booting before Spring is there-->
<property name="pattern">%d{yyyy-MM-dd HH:mm:ss} %level{length=5} [%encode{$${ctx:username:-SYSTEM}}{CRLF}] %logger{1} - %encode{%msg}{CRLF}%n</property>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ logging.level.de.tudarmstadt.ukp.inception.security=TRACE
== Custom logging

A custom logging configuration can be specified when starting up {product-name} using the parameter
`-Dlog4j.configurationFile=/path/to/your/log4.xml`. This should be a standard Log4J configuration file.
`-Dlogging.config=/path/to/your/log4.xml`. This should be a standard Log4J2 configuration file.
A good starting point is the default configuration used by {product-name} which can be found in link:https://github.com/inception-project/inception/blob/main/inception/inception-app-webapp/src/main/resources/log4j2.xml[our code repository].

== Logging in JSON format

If you would like to integrate the logging output of {product-name} with something like LogStash and
Kibana, you may want log output to be in a properly interpretable JSON format, instead of the usual
plain text format. {product-name} comes with several JSON configurations that are compatible with
popular tools like LogStash and others. You can activate it by adding the following sections to a custom `log4j.xml` file in the `Appenders` sections and in the `Root` logger.
popular tools like LogStash and others. You can activate it by adding the following sections to a custom `log4j2.xml` file in the `Appenders` sections and in the `Root` logger.

[source,text]
----
Expand Down
4 changes: 4 additions & 0 deletions inception/inception-ui-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure</artifactId>
</dependency>

<!-- Spring security dependencies -->
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import org.springframework.core.annotation.Order;

@Order(FooterItem.ORDER_CENTER)
@org.springframework.stereotype.Component
public class VersionFooterItem
implements FooterItem
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import org.springframework.core.annotation.Order;

@Order(FooterItem.ORDER_RIGHT)
@org.springframework.stereotype.Component
public class WarningsFooterItem
implements FooterItem
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import de.tudarmstadt.ukp.clarin.webanno.ui.core.footer.FooterItem;

@Order(FooterItem.ORDER_RIGHT + 100)
@org.springframework.stereotype.Component
public class AboutFooterItem
implements FooterItem
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,35 @@
*/
package de.tudarmstadt.ukp.inception.ui.core.config;

import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import de.tudarmstadt.ukp.clarin.webanno.ui.core.footer.VersionFooterItem;
import de.tudarmstadt.ukp.clarin.webanno.ui.core.footer.WarningsFooterItem;
import de.tudarmstadt.ukp.inception.ui.core.about.AboutFooterItem;

@Configuration
@EnableConfigurationProperties(CspPropertiesImpl.class)
public class CoreUiAutoConfiguration
{
// No beans yet
@ConditionalOnMissingBean(value = VersionFooterItem.class)
@Bean
public VersionFooterItem versionFooterItem()
{
return new VersionFooterItem();
}

@Bean
public WarningsFooterItem warningsFooterItem()
{
return new WarningsFooterItem();
}

@Bean
public AboutFooterItem aboutFooterItem()
{
return new AboutFooterItem();
}
}
40 changes: 20 additions & 20 deletions inception/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,7 @@
<dependency>
<groupId>com.squareup.okio</groupId>
<artifactId>okio-jvm</artifactId>
<version>${okio.version}</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -1067,6 +1068,20 @@
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp-bom</artifactId>
<version>${okhttp.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>com.squareup.okio</groupId>
<artifactId>okio-bom</artifactId>
<version>${okio.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-suite-engine</artifactId>
Expand All @@ -1092,21 +1107,6 @@
<artifactId>assertj-core</artifactId>
<version>${assertj.version}</version>
</dependency>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>mockwebserver</artifactId>
<version>${okhttp.version}</version>
</dependency>
<dependency>
<groupId>com.squareup.okio</groupId>
<artifactId>okio</artifactId>
<version>${okio.version}</version>
</dependency>
<dependency>
<groupId>com.squareup.okio</groupId>
<artifactId>okio-jvm</artifactId>
<version>${okio.version}</version>
</dependency>
<dependency>
<groupId>no.nav.security</groupId>
<artifactId>mock-oauth2-server</artifactId>
Expand All @@ -1124,11 +1124,6 @@
<artifactId>nimbus-jose-jwt</artifactId>
<version>9.31</version>
</dependency>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
<version>${okhttp.version}</version>
</dependency>
<dependency>
<groupId>org.awaitility</groupId>
<artifactId>awaitility</artifactId>
Expand Down Expand Up @@ -2451,6 +2446,11 @@
<artifactId>hibernate-jpamodelgen</artifactId>
<version>${hibernate.version}</version>
</path>
<path>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>${log4j2.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
Expand Down

0 comments on commit fa61575

Please sign in to comment.