[
https://issues.apache.org/jira/browse/GEODE-258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15998723#comment-15998723
]
ASF GitHub Bot commented on GEODE-258:
--------------------------------------
Github user kirklund commented on the issue:
https://github.com/apache/geode/pull/467
I think you should the log statements to use Log4j2 loggers instead of
changing them to use a different getLogWriter() API. This work was started in
2014 and was never finished.
To convert a class to use Logger, do the following:
```java
import org.apache.logging.log4j.Logger;
import org.apache.geode.internal.logging.LogService;
...
private static final Logger logger = LogService.getLogger();
```
And then change blocks like this:
```java
if ((logger != null) && logger.fineEnabled()) {
logger.fine("RegionSubRegionSnapshot Region entry count =" +
this.entryCount + " for region =" + this.name);
```
To this:
```java
if (logger.isDebugEnabled()) {
logger.debug("RegionSubRegionSnapshot Region entry count ={} for region
={}", this.entryCount, this.name);
```
> Remove deprecated Cache.getLoggerI18n and getSecurityLoggerI18n methods
> -----------------------------------------------------------------------
>
> Key: GEODE-258
> URL: https://issues.apache.org/jira/browse/GEODE-258
> Project: Geode
> Issue Type: Sub-task
> Reporter: Darrel Schneider
> Assignee: Avinash Dongre
> Original Estimate: 2h
> Remaining Estimate: 2h
>
> Remove the deprecated Cache.getLoggerI18n and getSecurityLoggerI18n methods.
> All calls can be replaced with getLogger().convertToLogWriterI18n() so this
> should be a quick task.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)