Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -334,8 +334,10 @@
<site-commons-compress.version>1.26.2</site-commons-compress.version>
<site-commons-csv.version>1.11.0</site-commons-csv.version>
<site-commons-logging.version>1.3.3</site-commons-logging.version>
<site-conversant.version>1.2.21</site-conversant.version>
<site-disruptor.version>4.0.0</site-disruptor.version>
<site-jackson.version>2.17.2</site-jackson.version>
<site-jctools.version>4.0.5</site-jctools.version>
<site-log4j-api.version>2.23.1</site-log4j-api.version>
<site-log4j-core.version>2.23.1</site-log4j-core.version>
<site-log4j-layout-template-json.version>2.23.1</site-log4j-layout-template-json.version>
Expand Down Expand Up @@ -747,6 +749,12 @@
<version>${site-commons-logging.version}</version>
</dependency>

<dependency>
<groupId>com.conversantmedia</groupId>
<artifactId>disruptor</artifactId>
<version>${site-conversant.version}</version>
</dependency>

<dependency>
<groupId>com.lmax</groupId>
<artifactId>disruptor</artifactId>
Expand All @@ -760,6 +768,12 @@
<type>pom</type>
</dependency>

<dependency>
<groupId>org.jctools</groupId>
<artifactId>jctools-core</artifactId>
<version>${site-jctools.version}</version>
</dependency>

<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
Expand Down
2 changes: 2 additions & 0 deletions src/site/antora/antora.tmpl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,10 @@ asciidoc:
commons-compress-version: "${site-commons-compress.version}"
commons-csv-version: "${site-commons-csv.version}"
commons-logging-version: "${site-commons-logging.version}"
conversant-version: "${site-conversant.version}"
disruptor-version: "${site-disruptor.version}"
jackson-version: "${site-jackson.version}"
jctools-version: "${site-jctools.version}"
log4j-api-version: "${log4j-api.version}"
log4j-core-version: "${site-log4j-core.version}"
log4j-layout-template-json-version: "${site-log4j-layout-template-json.version}"
Expand Down
2 changes: 2 additions & 0 deletions src/site/antora/antora.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,10 @@ asciidoc:
commons-compress-version: "1.2.3-commons-compress"
commons-csv-version: "1.2.3-commons-csv"
commons-logging-version: "1.2.3-commons-logging"
conversant-version: "1.2.3-conversant"
disruptor-version: "1.2.3-disruptor"
jackson-version: "1.2.3-jackson"
jctools-version: "1.2.3-jctools"
log4j-api-version: "1.2.3-api"
log4j-core-version: "1.2.3-core"
log4j-layout-template-json-version: "1.2.3-layout-template-json"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"Configuration": {
"Appenders": {
// tag::appenders[]
"File": {
"name": "FILE",
"fileName": "app.log"
},
"Async": {
"name": "ASYNC"
}
// end::appenders[]
},
"Loggers": {
"Root": {
"level": "INFO",
"AppenderRef": {
"ref": "ASYNC"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to you 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
#
# 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.
#
##
# tag::appenders[]
appender.0.type = File
appender.0.name = FILE
appender.0.fileName = app.log

appender.1.type = Async
appender.1.name = ASYNC
appender.1.appenderRef.type = AppenderRef
appender.1.appenderRef.ref = FILE
# end::appenders[]

rootLogger.level = INFO
rootLogger.appenderRef.0.ref = ASYNC
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Licensed to the Apache Software Foundation (ASF) under one or more
~ contributor license agreements. See the NOTICE file distributed with
~ this work for additional information regarding copyright ownership.
~ The ASF licenses this file to you 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
~
~ 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.
-->
<Configuration xmlns="https://logging.apache.org/xml/ns"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
https://logging.apache.org/xml/ns
https://logging.apache.org/xml/ns/log4j-config-2.xsd">
<Appenders>
<!-- tag::appenders[] -->
<File name="FILE"
fileName="app.log">
<JsonTemplateLayout/>
</File>
<Async name="ASYNC">
<AppenderRef ref="FILE"/>
</Async>
<!-- end::appenders[] -->
</Appenders>
<Loggers>
<Root level="INFO">
<AppenderRef ref="ASYNC"/>
</Root>
</Loggers>
</Configuration>
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to you 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
#
# 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.
#
Configuration:
Appenders:
# tag::appenders[]
File:
name: "FILE"
fileName: "app.log"
Async:
name: "ASYNC"
AppenderRef:
ref: "FILE"
# end::appenders[]
Loggers:
Root:
level: "INFO"
AppenderRef:
ref: "ASYNC"
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"Configuration": {
"Appenders": {
// tag::appenders[]
"File": {
"name": "FILE",
"fileName": "app.log",
"ignoreExceptions": false // <1>
},
"Console": {
"name": "CONSOLE"
},
"Failover": {
"name": "FAILOVER",
"primary": "FILE",
"Failovers": {
"AppenderRef": {
"ref": "CONSOLE"
}
}
}
// end::appenders[]
},
"Loggers": {
"Root": {
"level": "INFO",
"AppenderRef": {
"ref": "FAILOVER"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to you 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
#
# 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.
#
##
# tag::appenders[]
appender.0.type = File
appender.0.name = FILE
appender.0.fileName = app.log
appender.0.ignoreExceptions = false

appender.1.type = Console
appender.1.name = CONSOLE

appender.2.type = Failover
appender.2.name = FAILOVER
appender.2.primary = FILE
appender.2.fail.type = Failovers
appender.2.fail.0.type = AppenderRef
appender.2.fail.0.ref = CONSOLE
# end::appenders[]

rootLogger.level = INFO
rootLogger.appenderRef.0.ref = FAILOVER
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Licensed to the Apache Software Foundation (ASF) under one or more
~ contributor license agreements. See the NOTICE file distributed with
~ this work for additional information regarding copyright ownership.
~ The ASF licenses this file to you 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
~
~ 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.
-->
<Configuration xmlns="https://logging.apache.org/xml/ns"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
https://logging.apache.org/xml/ns
https://logging.apache.org/xml/ns/log4j-config-2.xsd">
<Appenders>
<!-- tag::appenders[] -->
<File name="FILE"
fileName="app.log"
ignoreExceptions="false"/> <!--1-->
<Console name="CONSOLE"/>
<Failover name="FAILOVER"
primary="FILE">
<Failovers>
<AppenderRef ref="CONSOLE"/>
</Failovers>
</Failover>
<!-- end::appenders[] -->
</Appenders>
<Loggers>
<Root level="INFO">
<AppenderRef ref="FAILOVER"/>
</Root>
</Loggers>
</Configuration>
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to you 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
#
# 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.
#
Configuration:
Appenders:
# tag::appenders[]
File:
name: "FILE"
fileName: "app.log"
ignoreExceptions: false
Console:
name: "CONSOLE"
Failover:
name: "FAILOVER"
primary: "FILE"
Failovers:
AppenderRef:
ref: "CONSOLE"
# end::appenders[]
Loggers:
Root:
level: "INFO"
AppenderRef:
ref: "FAILOVER"
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"Configuration": {
"Appenders": {
"Console": {
"name": "CONSOLE",
"JsonTemplateLayout": {}
},
// tag::appender[]
"Rewrite": {
"name": "REWRITE",
"LoggerNameLevelRewritePolicy": { // <1>
"logger": "org.example",
"KeyValuePair": [
{
"key": "WARN",
"value": "INFO"
},
{
"key": "INFO",
"value": "DEBUG"
}
]
},
"AppenderRef": {
"level": "INFO", // <2>
"ref": "CONSOLE"
}
}
// end::appender[]
},
"Loggers": {
"Root": {
"level": "INFO",
"AppenderRef": {
"ref": "REWRITE"
}
}
}
}
}
Loading