Skip to content

Commit 42b42a0

Browse files
committed
Add "Simple Logger" API implementation
1 parent 087d152 commit 42b42a0

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

src/site/antora/modules/ROOT/pages/manual/installation.adoc

+29
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,11 @@ include::partial$components/log4j-api.adoc[]
133133
134134
Log4j provides several modules to facilitate the deployment of different logging implementations:
135135
136+
xref:manual/simple-logger.adoc[]::
137+
This is a fallback implementation embedded into the Log4j API artifact.
138+
The usage of this implementation generates an error message unless you enable it explicitly.
139+
See <<impl-simple>> for more details.
140+
136141
`log4j-core`::
137142
The reference implementation.
138143
Log4 Core primarily accepts input from Log4j API.
@@ -169,6 +174,30 @@ h| Gradle
169174
|===
170175
====
171176
177+
[#impl-simple]
178+
=== Installing Simple Logger
179+
180+
The
181+
xref:manual/simple-logger.adoc[Simple Logger]
182+
implementation is embedded in the Log4j API and does not need any external dependency.
183+
It is intended as a convenience for environments where either a fully-fledged logging implementation is missing, or cannot be included for other reasons.
184+
The Log4j API will log an error to the
185+
xref:manual/status-logger.adoc[Status Logger] to avoid its unintentional usages:
186+
187+
----
188+
2024-10-03T11:53:34.281462230Z main ERROR Log4j API could not find a logging provider.
189+
----
190+
191+
To remove the warning and confirm that you want to use Simple Logger, add a
192+
xref:manual/systemproperties.adoc#property-sources[`log4j2.component.properties` file]
193+
at the root of your class path with content:
194+
195+
[source,properties]
196+
----
197+
# Activate Simple Logger implementation
198+
log4j.provider = org.apache.logging.log4j.simple.internal.SimpleProvider
199+
----
200+
172201
[#impl-core]
173202
=== Installing Log4j Core
174203

0 commit comments

Comments
 (0)