Skip to content

Commit df8e72f

Browse files
authored
Add ProGuard rules to the FAQ (#2182)
1 parent 236ebe8 commit df8e72f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/site/markdown/faq.md.vm

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ $h1 Frequently Asked Questions
3737
* [Is Log4j 2 still garbage-free when I use the SLF4J API?](#gc-free-slf4j)
3838
* [How do I log my domain object without creating garbage?](#gc-free-domain-object)
3939
* [How do I create a custom logger wrapper that shows the correct class, method and line number?](#logger-wrapper)
40+
* [Which rules do I need to add when minification is enabled?](#proguard-rules)
4041

4142
<a name="missing_core"/>
4243

@@ -494,3 +495,12 @@ This tool was originally meant to support custom log levels and is documented
494495
[here](https://logging.apache.org/log4j/2.x/manual/customloglevels.html#CustomLoggers).
495496

496497
The generated logger code will take care of the FQCN.
498+
499+
<a name="proguard-rules" />
500+
501+
$h4 Which rules do I need to add when ProGuard minification is enabled?
502+
503+
When you are using Log4j with ProGuard/R8 enabled, you need to add the following rules to your configuration file:
504+
```
505+
-keep,allowoptimization class org.apache.logging.log4j.** { *; }
506+
```

0 commit comments

Comments
 (0)