Skip to content
This repository has been archived by the owner on Feb 27, 2024. It is now read-only.

Commit

Permalink
Update log4j to 2.16.0, release 7.4.4
Browse files Browse the repository at this point in the history
  • Loading branch information
dualspiral committed Dec 14, 2021
1 parent 127ba87 commit db1a34c
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion SpongeCommon
8 changes: 4 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ dependencies {
runtime 'org.jline:jline-terminal-jansi:3.12.1'

// log4j 2.15 to avoid nasty exploit
runtime 'org.apache.logging.log4j:log4j-api:2.15.0'
runtime 'org.apache.logging.log4j:log4j-core:2.15.0'
runtime 'org.apache.logging.log4j:log4j-api:2.16.0'
runtime 'org.apache.logging.log4j:log4j-core:2.16.0'

shadow 'org.ow2.asm:asm-all:5.2'

Expand Down Expand Up @@ -149,8 +149,8 @@ shadowJar {
include dependency('org.jline:jline-reader')
include dependency('org.fusesource.jansi:jansi')

include dependency('org.apache.logging.log4j:log4j-api:2.15.0')
include dependency('org.apache.logging.log4j:log4j-core:2.15.0')
include dependency('org.apache.logging.log4j:log4j-api:2.16.0')
include dependency('org.apache.logging.log4j:log4j-core:2.16.0')

include dependency('com.eclipsesource.minimal-json:minimal-json')
}
Expand Down
8 changes: 4 additions & 4 deletions src/main/resources/log4j2-test.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
<Appenders>
<TerminalConsole name="Console">
<PatternLayout>
<LoggerNamePatternSelector defaultPattern="%highlightError{[%d{HH:mm:ss} %level] [%logger]: %minecraftFormatting{%msg}%n%xEx}">
<LoggerNamePatternSelector defaultPattern="%highlightError{[%d{HH:mm:ss} %level] [%logger]: %minecraftFormatting{%msg{nolookups}}%n%xEx}">
<!-- Log root Minecraft and Mojang without logger prefix -->
<PatternMatch key=",net.minecraft.,com.mojang."
pattern="%highlightError{[%d{HH:mm:ss} %level]: %minecraftFormatting{%msg}%n%xEx}"/>
pattern="%highlightError{[%d{HH:mm:ss} %level]: %minecraftFormatting{%msg{nolookups}}%n%xEx}"/>
</LoggerNamePatternSelector>
</PatternLayout>
</TerminalConsole>

<RollingRandomAccessFile name="File" fileName="logs/latest.log" filePattern="logs/%d{yyyy-MM-dd}-%i.log.gz">
<PatternLayout>
<LoggerNamePatternSelector defaultPattern="[%d{HH:mm:ss}] [%t/%level] [%logger]: %minecraftFormatting{%msg}{strip}%n">
<LoggerNamePatternSelector defaultPattern="[%d{HH:mm:ss}] [%t/%level] [%logger]: %minecraftFormatting{%msg{nolookups}}{strip}%n">
<!-- Log root Minecraft and Mojang without logger prefix -->
<PatternMatch key=",net.minecraft.,com.mojang."
pattern="[%d{HH:mm:ss}] [%t/%level]: %minecraftFormatting{%msg}{strip}%n"/>
pattern="[%d{HH:mm:ss}] [%t/%level]: %minecraftFormatting{%msg{nolookups}}{strip}%n"/>
</LoggerNamePatternSelector>
</PatternLayout>

Expand Down
8 changes: 4 additions & 4 deletions src/main/resources/log4j2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
<Appenders>
<TerminalConsole name="Console">
<PatternLayout>
<LoggerNamePatternSelector defaultPattern="%highlightError{[%d{HH:mm:ss} %level] [%logger]: %minecraftFormatting{%msg}%n%xEx}">
<LoggerNamePatternSelector defaultPattern="%highlightError{[%d{HH:mm:ss} %level] [%logger]: %minecraftFormatting{%msg{nolookups}}%n%xEx}">
<!-- Log root Minecraft and Mojang without logger prefix -->
<PatternMatch key=",net.minecraft.,com.mojang."
pattern="%highlightError{[%d{HH:mm:ss} %level]: %minecraftFormatting{%msg}%n%xEx}"/>
pattern="%highlightError{[%d{HH:mm:ss} %level]: %minecraftFormatting{%msg{nolookups}}%n%xEx}"/>
</LoggerNamePatternSelector>
</PatternLayout>
</TerminalConsole>

<RollingRandomAccessFile name="File" fileName="logs/latest.log" filePattern="logs/%d{yyyy-MM-dd}-%i.log.gz">
<PatternLayout>
<LoggerNamePatternSelector defaultPattern="[%d{HH:mm:ss}] [%t/%level] [%logger]: %minecraftFormatting{%msg}{strip}%n">
<LoggerNamePatternSelector defaultPattern="[%d{HH:mm:ss}] [%t/%level] [%logger]: %minecraftFormatting{%msg{nolookups}}{strip}%n">
<!-- Log root Minecraft and Mojang without logger prefix -->
<PatternMatch key=",net.minecraft.,com.mojang."
pattern="[%d{HH:mm:ss}] [%t/%level]: %minecraftFormatting{%msg}{strip}%n"/>
pattern="[%d{HH:mm:ss}] [%t/%level]: %minecraftFormatting{%msg{nolookups}}{strip}%n"/>
</LoggerNamePatternSelector>
</PatternLayout>

Expand Down

0 comments on commit db1a34c

Please sign in to comment.