-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Revamp Configuration
page
#2574
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
Merged
+4,720
−3,001
Merged
Changes from 8 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
47ce519
New configuration page
ppkarwasz f6c6308
Revamp configuration page
ppkarwasz 553dd7b
Move configuration properties to separate page
ppkarwasz a330c6b
Add arbiters and scripts
ppkarwasz 1d1a69c
Move scripts to a separate file
ppkarwasz c84f0a5
Exclude Antora examples from RAT configuration
ppkarwasz 78cfcd3
Add headers to example files
ppkarwasz 5f8e0ae
Proofreading
ppkarwasz cd8a617
grammar, typos, some rewording
grobmeier ced35ab
tiny improvements on wording
grobmeier f797fcb
Apply suggestions from code review
ppkarwasz d55b35a
Simplify arbiters-select example
ppkarwasz 1c61b03
Wrap `schemaLocation` attribute
ppkarwasz fcacdee
Remove attribute with default value
ppkarwasz 76bb04f
YAML formatting
ppkarwasz 01ef75c
Fix reference naming
ppkarwasz 7195861
Miscellaneous fixes
ppkarwasz a786e62
Paragraph formatting problems
ppkarwasz 61c2c6f
tiny wording/spelling improvements
grobmeier e84a46c
tiny wording improvments and corrections
grobmeier be54ca2
Apply suggestions from code review (2)
ppkarwasz 5f8a7dc
Add logger configuration example
ppkarwasz cd69a98
Add property expansion example
ppkarwasz 7e873f3
some active/passive changes, wording and general style. No content ch…
grobmeier File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
src/site/antora/modules/ROOT/examples/configuration/arbiters-select.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"Configuration": { | ||
"Appenders": { | ||
"File": { | ||
"name": "MAIN", | ||
"Select": { | ||
"SystemPropertyArbiter": { // <1> | ||
"propertyName": "env", | ||
"propertyValue": "dev", | ||
"PatternLayout": { | ||
"pattern": "%d [%t] %p %c - %m%n" | ||
ppkarwasz marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} | ||
}, | ||
"DefaultArbiter": { // <2> | ||
"JsonTemplateLayout": {} | ||
} | ||
} | ||
} | ||
}, | ||
"Loggers": { | ||
"Root": { | ||
"level": "INFO", | ||
"AppenderRef": { | ||
"ref": "MAIN" | ||
} | ||
} | ||
} | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
src/site/antora/modules/ROOT/examples/configuration/arbiters-select.properties
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# | ||
# 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.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.0.layout.pattern = %d [%t] %p %c - %m%n | ||
|
||
appender.0.select.1.type = DefaultArbiter # <2> | ||
appender.0.select.1.layout.type = JsonTemplateLayout | ||
|
||
rootLogger.level = INFO | ||
rootLogger.appenderRef.0.ref = MAIN |
38 changes: 38 additions & 0 deletions
38
src/site/antora/modules/ROOT/examples/configuration/arbiters-select.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"> | ||
<Select> | ||
<SystemPropertyArbiter propertyName="env" propertyValue="dev"> <!--1--> | ||
<PatternLayout pattern="%d [%t] %p %c - %m%n"/> | ||
</SystemPropertyArbiter> | ||
<DefaultArbiter> <!--2--> | ||
<JsonTemplateLayout/> | ||
</DefaultArbiter> | ||
</Select> | ||
</File> | ||
</Appenders> | ||
<Loggers> | ||
<Root level="INFO"> | ||
<AppenderRef ref="MAIN"/> | ||
</Root> | ||
</Loggers> | ||
</Configuration> |
34 changes: 34 additions & 0 deletions
34
src/site/antora/modules/ROOT/examples/configuration/arbiters-select.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
Select: | ||
SystemPropertyArbiter: # <1> | ||
propertyName: "env" | ||
propertyValue: "dev" | ||
PatternLayout: | ||
pattern: "%d [%t] %p %c - %m%n" | ||
DefaultArbiter: # <2> | ||
JsonTemplateLayout: { } | ||
Loggers: | ||
Root: | ||
level: "INFO" | ||
AppenderRef: | ||
ref: "MAIN" |
33 changes: 33 additions & 0 deletions
33
src/site/antora/modules/ROOT/examples/configuration/arbiters.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
ppkarwasz marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} | ||
}, | ||
// <2> | ||
{ | ||
"propertyName": "env", | ||
"propertyValue": "prod", | ||
"JsonTemplateLayout": {} | ||
} | ||
] | ||
} | ||
}, | ||
"Loggers": { | ||
"Root": { | ||
"level": "INFO", | ||
"AppenderRef": { | ||
"ref": "MAIN" | ||
} | ||
} | ||
} | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
src/site/antora/modules/ROOT/examples/configuration/arbiters.properties
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
36 changes: 36 additions & 0 deletions
36
src/site/antora/modules/ROOT/examples/configuration/arbiters.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?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> |
34 changes: 34 additions & 0 deletions
34
src/site/antora/modules/ROOT/examples/configuration/arbiters.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
37 changes: 37 additions & 0 deletions
37
src/site/antora/modules/ROOT/examples/configuration/filters.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"Configuration": { | ||
"Appenders": { | ||
"Console": { | ||
"name": "CONSOLE", | ||
"ThresholdFilter": { | ||
"level": "WARN" // <6> | ||
} | ||
} | ||
}, | ||
"Loggers": { | ||
"Root": { | ||
"level": "INFO", | ||
"ThresholdFilter": { // <3> | ||
"level": "DEBUG" | ||
}, | ||
"AppenderRef": { | ||
"ref": "CONSOLE", | ||
"level": "WARN", // <5> | ||
"MarkerFilter": { // <4> | ||
"marker": "ALERT", | ||
"onMatch": "NEUTRAL", | ||
"onMismatch": "DENY" | ||
} | ||
} | ||
}, | ||
"Logger": { | ||
"name": "org.example", | ||
"level": "TRACE" // <2> | ||
} | ||
} | ||
}, | ||
"MarkerFilter": { // <1> | ||
"marker": "PRIVATE", | ||
"onMismatch": "NEUTRAL" | ||
} | ||
} |
39 changes: 39 additions & 0 deletions
39
src/site/antora/modules/ROOT/examples/configuration/filters.properties
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# | ||
# 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 = Console | ||
appender.0.name = CONSOLE | ||
appender.0.filter.type = ThresholdFilter # <6> | ||
appender.0.filter.level = WARN | ||
|
||
rootLogger.level = INFO | ||
rootLogger.filter.type = ThresholdFilter # <3> | ||
rootLogger.filter.level = DEBUG | ||
rootLogger.appenderRef.0.ref = CONSOLE | ||
rootLogger.appenderRef.0.level = WARN # <5> | ||
rootLogger.appenderRef.0.filter.type = MarkerFilter # <4> | ||
rootLogger.appenderRef.0.filter.marker = ALERT | ||
rootLogger.appenderRef.0.filter.onMatch = NEUTRAL | ||
rootLogger.appenderRef.0.filter.onMismatch = DENY | ||
|
||
logger.0.name = org.example | ||
logger.0.level = DEBUG # <2> | ||
logger.0.filter.type = ThresholdFilter # <3> | ||
logger.0.filter.level = TRACE | ||
|
||
filter.type = MarkerFilter # <1> | ||
filter.marker = PRIVATE | ||
filter.onMismatch = NEUTRAL |
40 changes: 40 additions & 0 deletions
40
src/site/antora/modules/ROOT/examples/configuration/filters.xml
ppkarwasz marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?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"> | ||
ppkarwasz marked this conversation as resolved.
Show resolved
Hide resolved
|
||
<Appenders> | ||
<Console name="CONSOLE"> | ||
<ThresholdFilter level="WARN"/> <!--6--> | ||
</Console> | ||
</Appenders> | ||
<Loggers> | ||
<Root level="INFO"> | ||
<ThresholdFilter level="DEBUG"/> <!--3--> | ||
<AppenderRef ref="CONSOLE" level="WARN"> <!--5--> | ||
<MarkerFilter marker="ALERT" | ||
onMatch="NEUTRAL" | ||
onMismatch="DENY"/> <!--4--> | ||
</AppenderRef> | ||
</Root> | ||
<Logger name="org.example" level="TRACE"> <!--2--> | ||
<ThresholdFilter level="TRACE"/> <!--3--> | ||
ppkarwasz marked this conversation as resolved.
Show resolved
Hide resolved
|
||
</Logger> | ||
</Loggers> | ||
<MarkerFilter marker="PRIVATE" onMismatch="NEUTRAL"/> <!--1--> | ||
ppkarwasz marked this conversation as resolved.
Show resolved
Hide resolved
|
||
</Configuration> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.