Skip to content

Commit 877ef02

Browse files
committed
Merge branch 'doc/2.x/properties' into 2.x
2 parents 91c2923 + 3507a9a commit 877ef02

27 files changed

+2014
-941
lines changed

src/site/antora/modules/ROOT/pages/log4j-jul.adoc

+21-19
Original file line numberDiff line numberDiff line change
@@ -43,40 +43,42 @@ Custom Handlers should instead use an appropriate xref:manual/appenders.adoc[App
4343
4444
Java logging levels are translated into Log4j logging levels dynamically.
4545
The following table lists the conversions between a Java logging level and its equivalent Log4j level.
46-
Custom levels should be implemented as an implementation of `LevelConverter`, and the Log4j property `log4j.jul.levelConverter` must be set to your custom class name.
46+
Custom levels should be implemented as an implementation of `LevelConverter`, and the Log4j property xref:manual/configuration.adoc#log4j2.julLevelConverter[log4j2.julLevelConverter] must be set to your custom class name.
4747
Using the default `LevelConverter` implementation, custom logging levels are mapped to whatever the current level of the `Logger` being logged to is using.
4848
49+
[#default-level-conversions]
4950
=== Default Level Conversions
5051
52+
.JUL to Log4j level conversion
5153
|===
5254
| Java Level | Log4j Level
5355
54-
| http://docs.oracle.com/javase/6/docs/api/java/util/logging/Level.html#OFF[`OFF`]
55-
| `OFF`
56+
| http://docs.oracle.com/javase/{java-target-version}/docs/api/java/util/logging/Level.html#OFF[OFF]
57+
| link:../javadoc/log4j-api/org/apache/logging/log4j/Level#OFF[OFF]
5658
57-
| http://docs.oracle.com/javase/6/docs/api/java/util/logging/Level.html#SEVERE[`SEVERE`]
58-
| `ERROR`
59+
| http://docs.oracle.com/javase/{java-target-version}/docs/api/java/util/logging/Level.html#SEVERE[SEVERE]
60+
| link:../javadoc/log4j-api/org/apache/logging/log4j/Level#ERROR[ERROR]
5961
60-
| http://docs.oracle.com/javase/6/docs/api/java/util/logging/Level.html#WARNING[`WARNING`]
61-
| `WARN`
62+
| http://docs.oracle.com/javase/{java-target-version}/docs/api/java/util/logging/Level.html#WARNING[WARNING]
63+
| link:../javadoc/log4j-api/org/apache/logging/log4j/Level#WARN[WARN]
6264
63-
| http://docs.oracle.com/javase/6/docs/api/java/util/logging/Level.html#INFO[`INFO`]
64-
| `INFO`
65+
| http://docs.oracle.com/javase/{java-target-version}/docs/api/java/util/logging/Level.html#OFF[OFF]
66+
| link:../javadoc/log4j-api/org/apache/logging/log4j/Level#INFO[INFO]
6567
66-
| http://docs.oracle.com/javase/6/docs/api/java/util/logging/Level.html#CONFIG[`CONFIG`]
67-
| `CONFIG`
68+
| http://docs.oracle.com/javase/{java-target-version}/docs/api/java/util/logging/Level.html#CONFIG[CONFIG]
69+
| custom `CONFIG` level
6870
69-
| http://docs.oracle.com/javase/6/docs/api/java/util/logging/Level.html#FINE[`FINE`]
70-
| `DEBUG`
71+
| http://docs.oracle.com/javase/{java-target-version}/docs/api/java/util/logging/Level.html#FINE[FINE]
72+
| link:../javadoc/log4j-api/org/apache/logging/log4j/Level#DEBUG[DEBUG]
7173
72-
| http://docs.oracle.com/javase/6/docs/api/java/util/logging/Level.html#FINER[`FINER`]
73-
| `TRACE`
74+
| http://docs.oracle.com/javase/{java-target-version}/docs/api/java/util/logging/Level.html#FINER[FINER]
75+
| link:../javadoc/log4j-api/org/apache/logging/log4j/Level#TRACE[TRACE]
7476
75-
| http://docs.oracle.com/javase/6/docs/api/java/util/logging/Level.html#FINEST[`FINEST`]
76-
| `FINEST`
77+
| http://docs.oracle.com/javase/{java-target-version}/docs/api/java/util/logging/Level.html#FINEST[FINEST]
78+
| custom `FINEST` level
7779
78-
| http://docs.oracle.com/javase/6/docs/api/java/util/logging/Level.html#ALL[`ALL`]
79-
| `ALL`
80+
| http://docs.oracle.com/javase/{java-target-version}/docs/api/java/util/logging/Level.html#ALL[ALL]
81+
| link:../javadoc/log4j-api/org/apache/logging/log4j/Level#ALL[ALL]
8082
|===
8183
8284
== Log4j JDK Logging Bridge Handler

src/site/antora/modules/ROOT/pages/log4j-spring-cloud-config-client.adoc

+3-61
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Spring Boot applications initialize logging 3 times.
2424
2525
. SpringApplication declares a Logger.
2626
This Logger will be initialized using Log4j's "normal" mechanisms.
27-
Thus a system property named log4j2.configurationFile will be checked to see if a specific configuration file has been provided, otherwise it will search for a configuration file on the classpath.
27+
Thus the xref:manual/configuration.adoc#log4j2.configurationFile[`log4j2.configurationFile`] system property will be checked to see if a specific configuration file has been provided, otherwise it will search for a configuration file on the classpath.
2828
The property may also be declare in log4j2.component.properties.
2929
3030
== Usage
@@ -122,67 +122,9 @@ logging:
122122
Note that Log4j currently does not directly support encrypting the password.
123123
However, Log4j does use Spring's standard APIs to access properties in the Spring configuration so any customizations made to Spring's property handling would apply to the properties Log4j uses as well.
124124
125-
If more extensive authentication is required an `AuthorizationProvider` can be implemented and the fully qualified class name in the `log4j2.authorizationProvider` system property, in log4j2.component.properties or in Spring's bootstrap.yml using either the `log4j2.authorizationProvider` key or with the key `logging.auth.authorizationProvider`.
125+
If more extensive authentication is required an `AuthorizationProvider` can be implemented and its fully qualified class name should be specified in the xref:manual/configuration.adoc#log4j2.configurationAuthorizationProvider[log4j2.configurationAuthorizationProvider] system property, in log4j2.component.properties or in Spring's `bootstrap.yml` using either the `log4j2.authorizationProvider` or `logging.auth.authorizationProvider` key.
126126
127-
TLS can be enabled by adding the following system properties or defining them in log4j2.component.properties
128-
129-
|===
130-
| Property | Optional or Default Value | Description
131-
132-
| log4j2.trustStoreLocation
133-
| Optional
134-
| The location of the trust store.
135-
If not provided the default trust store will be used.
136-
137-
| log4j2.trustStorePassword
138-
| Optional
139-
| Password needed to access the trust store.
140-
141-
| log4j2.trustStorePasswordFile
142-
| Optional
143-
| The location of a file that contains the password for the trust store.
144-
145-
| log4j2.trustStorePasswordEnvironmentVariable
146-
| Optional
147-
| The name of the environment variable that contains the trust store password.
148-
149-
| log4j2.trustStoreKeyStoreType
150-
| Required if keystore location provided
151-
| The type of key store.
152-
153-
| log4j2.trustStoreKeyManagerFactoryAlgorithm
154-
| Optional
155-
| Java cryptographic algorithm.
156-
157-
| log4j2.keyStoreLocation
158-
| Optional
159-
| The location of the key store.
160-
If not provided the default key store will be used.
161-
162-
| log4j2.keyStorePassword
163-
| Optional
164-
| Password needed to access the key store.
165-
166-
| log4j2.keyStorePasswordFile
167-
| Optional
168-
| The location of a file that contains the password for the key store.
169-
170-
| log4j2.keyStorePasswordEnvironmentVariable
171-
| Optional
172-
| The name of the environment variable that contains the key store password.
173-
174-
| log4j2.keyStoreType
175-
| Required if trust store location provided.
176-
| The type of key store.
177-
178-
| log4j2.keyStoreKeyManagerFactoryAlgorithm
179-
| Optional
180-
| Java cryptographic algorithm.
181-
182-
| log4j2.sslVerifyHostName
183-
| false
184-
| true or false
185-
|===
127+
For the properties required by TLS configuration see xref:manual/configuration.adoc#transport-security[the Transport Security configuration].
186128
187129
== Requirements
188130

0 commit comments

Comments
 (0)