Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revamp Configuration page #2574

Merged
merged 24 commits into from
May 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
47ce519
New configuration page
ppkarwasz Apr 30, 2024
f6c6308
Revamp configuration page
ppkarwasz May 10, 2024
553dd7b
Move configuration properties to separate page
ppkarwasz May 10, 2024
a330c6b
Add arbiters and scripts
ppkarwasz May 12, 2024
1d1a69c
Move scripts to a separate file
ppkarwasz May 12, 2024
c84f0a5
Exclude Antora examples from RAT configuration
ppkarwasz May 12, 2024
78cfcd3
Add headers to example files
ppkarwasz May 12, 2024
5f8e0ae
Proofreading
ppkarwasz May 13, 2024
cd8a617
grammar, typos, some rewording
grobmeier May 13, 2024
ced35ab
tiny improvements on wording
grobmeier May 13, 2024
f797fcb
Apply suggestions from code review
ppkarwasz May 14, 2024
d55b35a
Simplify arbiters-select example
ppkarwasz May 14, 2024
1c61b03
Wrap `schemaLocation` attribute
ppkarwasz May 14, 2024
fcacdee
Remove attribute with default value
ppkarwasz May 14, 2024
76bb04f
YAML formatting
ppkarwasz May 14, 2024
01ef75c
Fix reference naming
ppkarwasz May 14, 2024
7195861
Miscellaneous fixes
ppkarwasz May 14, 2024
a786e62
Paragraph formatting problems
ppkarwasz May 14, 2024
61c2c6f
tiny wording/spelling improvements
grobmeier May 14, 2024
e84a46c
tiny wording improvments and corrections
grobmeier May 14, 2024
be54ca2
Apply suggestions from code review (2)
ppkarwasz May 15, 2024
5f8a7dc
Add logger configuration example
ppkarwasz May 15, 2024
cd69a98
Add property expansion example
ppkarwasz May 15, 2024
7e873f3
some active/passive changes, wording and general style. No content ch…
grobmeier May 15, 2024
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"Configuration": {
"Appenders": {
"File": {
"name": "MAIN",
// tag::select[]
"Select": {
"SystemPropertyArbiter": { // <1>
"propertyName": "env",
"propertyValue": "dev",
"PatternLayout": {}
},
"DefaultArbiter": { // <2>
"JsonTemplateLayout": {}
}
}
// end::select[]
}
},
"Loggers": {
"Root": {
"level": "INFO",
"AppenderRef": {
"ref": "MAIN"
}
}
}
}
}
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.
#
appender.0.type = File
appender.0.name = MAIN
# tag::select[]
appender.0.select.type = Select

appender.0.select.0.type = SystemPropertyArbiter # <1>
appender.0.select.0.propertyName = env
appender.0.select.0.propertyValue = dev
appender.0.select.0.layout.type = PatternLayout

appender.0.select.1.type = DefaultArbiter # <2>
appender.0.select.1.layout.type = JsonTemplateLayout
# end::select[]

rootLogger.level = INFO
rootLogger.appenderRef.0.ref = MAIN
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>
<File name="MAIN" fileName="logs/app.log">
<!-- tag::select[] -->
<Select>
<SystemPropertyArbiter propertyName="env" propertyValue="dev"> <!--1-->
<PatternLayout/>
</SystemPropertyArbiter>
<DefaultArbiter> <!--2-->
<JsonTemplateLayout/>
</DefaultArbiter>
</Select>
<!-- end::select[] -->
</File>
</Appenders>
<Loggers>
<Root level="INFO">
<AppenderRef ref="MAIN"/>
</Root>
</Loggers>
</Configuration>
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#
# 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:
File:
name: "MAIN"
fileName: "logs/app.log"
# tag::select[]
Select:
SystemPropertyArbiter: # <1>
propertyName: "env"
propertyValue: "dev"
PatternLayout: {}
DefaultArbiter: # <2>
JsonTemplateLayout: {}
# end::select[]
Loggers:
Root:
level: "INFO"
AppenderRef:
ref: "MAIN"
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"Configuration": {
"Appenders": {
"File": {
"name": "MAIN",
"SystemPropertyArbiter": [
// <1>
{
"propertyName": "env",
"propertyValue": "dev",
"PatternLayout": {
"pattern": "%d [%t] %p %c - %m%n"
}
},
// <2>
{
"propertyName": "env",
"propertyValue": "prod",
"JsonTemplateLayout": {}
}
]
}
},
"Loggers": {
"Root": {
"level": "INFO",
"AppenderRef": {
"ref": "MAIN"
}
}
}
}
}
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.
#
appender.0.type = File
appender.0.name = MAIN

appender.0.arbiter[0].type = SystemPropertyArbiter # <1>
appender.0.arbiter[0].propertyName = env
appender.0.arbiter[0].propertyValue = dev
appender.0.arbiter[0].layout.type = PatternLayout
appender.0.arbiter[0].layout.pattern = %d [%t] %p %c - %m%n

appender.0.arbiter[1].type = SystemPropertyArbiter # <2>
appender.0.arbiter[1].propertyName = env
appender.0.arbiter[1].propertyValue = prod
appender.0.arbiter[1].layout.type = JsonTemplateLayout

rootLogger.level = INFO
rootLogger.appenderRef.0.ref = MAIN
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?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>
<File name="MAIN" fileName="logs/app.log">
<SystemPropertyArbiter propertyName="env" propertyValue="dev"> <!--1-->
<PatternLayout pattern="%d [%t] %p %c - %m%n"/>
</SystemPropertyArbiter>
<SystemPropertyArbiter propertyName="env" propertyValue="prod"> <!--2-->
<JsonTemplateLayout/>
</SystemPropertyArbiter>
</File>
</Appenders>
<Loggers>
<Root level="INFO">
<AppenderRef ref="MAIN"/>
</Root>
</Loggers>
</Configuration>
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#
# 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:
File:
name: "MAIN"
fileName: "logs/app.log"
SystemPropertyArbiter:
- propertyName: "env" # <1>
propertyValue: "dev"
PatternLayout:
pattern: "%d [%t] %p %c - %m%n"
- propertyName: "env" # <2>
propertyValue: "prod"
JsonTemplateLayout: {}
Loggers:
Root:
level: "INFO"
AppenderRef:
ref: "MAIN"
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"Configuration": {
"Appenders": {},
"Loggers": {
// tag::loggers[]
"Root": {
"Property": {
"name": "client.address",
"value": "$${web:request.remoteAddress}"
}
},
"Logger": [
{
"name": "org.hibernate",
"Property": {
"subsystem": "Database"
}
},
{
"name": "io.netty",
"Property": {
"subsystem": "Networking"
}
}
]
// end::loggers[]
}
}
}
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.
#
##
# tag::loggers[]
rootLogger.property.type = Property
rootLogger.name = client.address
rootLogger.value = $${web:request.remoteAddress}

logger.0.name = org.hibernate
logger.0.property.type = Property
logger.0.property.name = subsystem
logger.0.property.value = Database

logger.1.name = io.netty
logger.1.property.type = Property
logger.1.property.name = subsystem
logger.1.property.value = Networking
# end::loggers[]
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?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/>
<Loggers>
<!-- tag::loggers[] -->
<Root>
<Property name="client.address" value="$${web:request.remoteAddress}"/>
</Root>
<Logger name="org.hibernate">
<Property name="subsystem" value="Database"/>
</Logger>
<Logger name="io.netty">
<Property name="subsystem" value="Networking"/>
</Logger>
<!-- end::loggers[] -->
</Loggers>
</Configuration>
Loading