This is an automated email from the ASF dual-hosted git repository.

vy pushed a commit to branch 2.x
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git


The following commit(s) were added to refs/heads/2.x by this push:
     new fbe9797051 Fix broken FAQ sections (#1466)
fbe9797051 is described below

commit fbe97970517cc130472a160f99bb3bf398e2c20f
Author: Volkan Yazıcı <[email protected]>
AuthorDate: Fri May 19 16:01:57 2023 +0200

    Fix broken FAQ sections (#1466)
---
 src/site/markdown/faq.md.vm | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/src/site/markdown/faq.md.vm b/src/site/markdown/faq.md.vm
index 1e13018829..4aad757af9 100644
--- a/src/site/markdown/faq.md.vm
+++ b/src/site/markdown/faq.md.vm
@@ -39,12 +39,14 @@ $h1 Frequently Asked Questions
 * [How do I create a custom logger wrapper that shows the correct class, 
method and line number?](#logger-wrapper)
 
 <a name="missing_core"/>
+
 $h4 I'm seeing this error "Unable to locate a logging implementation, using 
SimpleLogger". What is wrong?
 
 You have the log4j-api-2.x jar file in your classpath but you still need to 
add the log4j-core-2.x jar to the
 classpath. (Also, it looks like you are using an old version of Log4j 2. You 
may want to upgrade.)
 
 <a name="which_jars"/>
+
 $h4 Which JAR files do I need?
 
 You need at least the log4j-api-2.x and the log4j-core-2.x jar files.
@@ -66,6 +68,7 @@ The component page will have more detail. For example, the
 has an outline of which log4j-core features have external dependencies.
 
 <a name="exclusions"/>
+
 $h4 How do I exclude conflicting dependencies?
 
 There are several scenarios where you may end up with conflicting 
dependencies, especially transitively
@@ -184,6 +187,7 @@ dependencies {
 ```
 
 <a name="config_location"/>
+
 $h4 How do I specify the configuration file location?
 
 By default, Log4j looks for a configuration file named **log4j2.xml** (not 
log4j.xml) in the classpath.
@@ -198,6 +202,7 @@ See [this 
section](http://logging.apache.org/log4j/2.x/manual/webapp.html#Contex
 of the Using Log4j 2 in Web Applications manual page.
 
 <a name="config_from_code"/>
+
 $h4 How do I configure log4j2 in code without a configuration file?
 
 Starting with version 2.4, Log4j 2 provides an [API for programmatic 
configuration](manual/customconfig.html)
@@ -207,6 +212,7 @@ allows you to create Configurations in code by constructing 
component definition
 without requiring you to know about the internals of actual configuration 
objects like Loggers and Appenders.
 
 <a name="reconfig_from_code"/>
+
 $h4 How do I reconfigure log4j2 in code with a specific configuration file?
 
 See the below example.
@@ -223,6 +229,7 @@ context.setConfigLocation(file.toURI());
 ```
 
 <a name="shutdown"/>
+
 $h4 How do I shut down log4j2 in code?
 
 Normally there is no need to do this manually.
@@ -245,6 +252,7 @@ LogManager.shutdown();
 ```
 
 <a name="config_sep_appender_level"/>
+
 $h4 How do I send log messages with different levels to different appenders?
 You don't need to declare separate loggers to achieve this.
 You can set the logging level on the `AppenderRef` element.
@@ -272,6 +280,7 @@ You can set the logging level on the `AppenderRef` element.
 ```
 
 <a name="troubleshooting"/>
+
 $h4 How do I debug my configuration?
 
 First, make sure you have [the right jar files](#which_jars) on your classpath.
@@ -301,6 +310,7 @@ log4j2 internal status logging by setting system property
 `-Dorg.apache.logging.log4j.simplelog.StatusLogger.level=TRACE`.
 
 <a name="separate_log_files"/>
+
 $h4 How do I dynamically write to separate log files?
 
 Look at the 
[RoutingAppender](http://logging.apache.org/log4j/2.x/manual/appenders.html#RoutingAppender).
@@ -361,6 +371,7 @@ You can use the `ThreadContext` map value to determine the 
log file name.
 ```
 
 <a name="reconfig_level_from_code"/>
+
 $h4 How do I set a logger's level programmatically?
 
 You can set a logger's level with the class
@@ -377,6 +388,7 @@ Configurator.setRootLevel(Level.DEBUG);
 ```
 
 <a name="retention"/>
+
 $h4 How do I set my log archive retention policy? How do I delete old log 
archives?
 
 The `DefaultRolloverStrategy` of the Rolling File appender (and Rolling Random 
Access File
@@ -390,6 +402,7 @@ conditions are not sufficient, users can provide custom 
conditions by creating
 [script condition](manual/appenders.html#ScriptCondition).
 
 <a name="api-tradeoffs" />
+
 $h4 What are the trade-offs of using the Log4j 2 API versus the SLF4J API?
 
 The Log4j 2 API and SLF4J have a lot in common.
@@ -419,6 +432,7 @@ Filters and Lookups to manipulate them.
 it avoids creating vararg arrays and avoids creating Strings when logging 
CharSequence objects.
 
 <a name="gc-free-slf4j" />
+
 $h4 Is Log4j 2 still garbage-free when I use the SLF4J API?
 
 Yes, the log4j-slf4j-impl binding (together with log4j-core) implements the
@@ -439,6 +453,7 @@ method is not yet implemented
 in a garbage-free manner in the log4j-slf4j-impl binding. It creates a new 
message object for each call.
 
 <a name="gc-free-domain-object" />
+
 $h4 How do I log my domain object without creating garbage?
 
 One option is to let the domain object implement java.lang.CharSequence.
@@ -463,6 +478,7 @@ public interface StringBuilderFormattable {
 ```
 
 <a name="logger-wrapper" />
+
 $h4 How do I create a custom logger wrapper that shows the correct class, 
method and line number?
 
 Log4j remembers the fully qualified class name (FQCN) of the logger and uses 
this to walk the stack trace

Reply via email to