<commit_before><% set_title("How", product_name, "Logging Works") %>

<!--
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.
-->

<%=vars.product_name_long%> uses Apache Log4j 2 as the basis for its logging system.

<%=vars.product_name%> uses [Apache Log4j 2](http://logging.apache.org/log4j/2.x/) API and Core libraries as the basis for its logging system. Log4j 2 API is a popular and powerful front-end logging API used by all the <%=vars.product_name%> classes to generate log statements. Log4j 2 Core is a backend implementation for logging; you can route any of the front-end logging API libraries to log to this backend. <%=vars.product_name%> uses the Core backend to run two custom Log4j 2 Appenders: **AlertAppender** and **LogWriterAppender**.

<%=vars.product_name%> has been tested with Log4j 2.1.

**Note:**
For this reason, <%=vars.product_name%> now always requires the following JARs to be in the classpath: `log4j-api-2.1.jar`, `log4j-core-2.1.jar`. Both of these JARs are distributed in the `$GEMFIRE/lib` directory and included in the appropriate `*-dependencies.jar` convenience libraries.

**AlertAppender** is the component that generates <%=vars.product_name%> alerts that are then managed by the JMX Management and Monitoring system. See [Notification Federation](../management/notification_federation_and_alerts.html#topic_212EE5A2ABAB4E8E8EF71807C9ECEF1A) for more details.

**LogWriterAppender** is the component that is configured by all the `log-*` <%=vars.product_name%> properties such as `log-file`, `log-file-size-limit` and `log-disk-space-limit`.

Both of these appenders are created and controlled programmatically. You configure their behavior with the `log-*` <%=vars.product_name%> properties and the alert level that is configured within the JMX Management & Monitoring system. These appenders do not currently support configuration within a `log4j2.xml` config file.

Advanced users may wish to define their own `log4j2.xml`. See [Advanced Users—Configuring Log4j 2 for <%=vars.product_name%>](configuring_log4j2.html) for more details.


<commit_msg>GEODE-5218 Update docs with Log4j 2 version (#1963)<commit_after><% set_title("How", product_name, "Logging Works") %>

<!--
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.
-->

<%=vars.product_name_long%> uses Apache Log4j 2 as the basis for its logging system.

<%=vars.product_name%> uses [Apache Log4j 2](http://logging.apache.org/log4j/2.x/) API and Core libraries as the basis for its logging system. Log4j 2 API is a popular and powerful front-end logging API used by all the <%=vars.product_name%> classes to generate log statements. Log4j 2 Core is a backend implementation for logging; you can route any of the front-end logging API libraries to log to this backend. <%=vars.product_name%> uses the Core backend to run two custom Log4j 2 Appenders: **AlertAppender** and **LogWriterAppender**.

<%=vars.product_name%> has been tested with Log4j 2.11.
<%=vars.product_name%> requires the 
`log4j-api-2.11.0.jar` and `log4j-core-2.11.0.jar`
JAR files to be in the classpath.
Both of these JARs are distributed in the `<path-to-product>/lib` directory and included in the appropriate `*-dependencies.jar` convenience libraries.

**AlertAppender** is the component that generates <%=vars.product_name%> alerts that are then managed by the JMX Management and Monitoring system. See [Notification Federation](../management/notification_federation_and_alerts.html#topic_212EE5A2ABAB4E8E8EF71807C9ECEF1A) for more details.

**LogWriterAppender** is the component that is configured by all the `log-*` <%=vars.product_name%> properties such as `log-file`, `log-file-size-limit` and `log-disk-space-limit`.

Both of these appenders are created and controlled programmatically. You configure their behavior with the `log-*` <%=vars.product_name%> properties and the alert level that is configured within the JMX Management & Monitoring system. These appenders do not currently support configuration within a `log4j2.xml` config file.

Advanced users may wish to define their own `log4j2.xml`. See [Advanced Users—Configuring Log4j 2 for <%=vars.product_name%>](configuring_log4j2.html) for more details.



{'fraction_non_alphanumeric': 0.08355603064314983, 'fraction_numerical': 0.01977552111170497, 'mean_word_length': 5.036559139784946, 'pattern_counts': {'":': 0, '<': 28, '<?xml version=': 0, '>': 28, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6740678', 'n_tokens_mistral': 1621, 'n_tokens_neox': 1509, 'n_words': 710}