[
https://issues.apache.org/jira/browse/HADOOP-18207?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17724540#comment-17724540
]
ASF GitHub Bot commented on HADOOP-18207:
-----------------------------------------
Apache9 commented on code in PR #5503:
URL: https://github.com/apache/hadoop/pull/5503#discussion_r1199614409
##########
hadoop-common-project/hadoop-common/src/main/conf/log4j.properties:
##########
@@ -299,7 +299,7 @@
log4j.appender.NMAUDIT.MaxBackupIndex=${nm.audit.log.maxbackupindex}
yarn.ewma.cleanupInterval=300
yarn.ewma.messageAgeLimitSeconds=86400
yarn.ewma.maxUniqueMessages=250
-log4j.appender.EWMA=org.apache.hadoop.yarn.util.Log4jWarningErrorMetricsAppender
+log4j.appender.EWMA=org.apache.hadoop.logging.appenders.Log4jWarningErrorMetricsAppender
Review Comment:
Why we need to change this?
##########
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/log/LogLevel.java:
##########
@@ -349,7 +348,7 @@ public void doGet(HttpServletRequest request,
HttpServletResponse response
}
if (GenericsUtil.isLog4jLogger(logName)) {
Review Comment:
We still have this util method? Which means we will still reference log4j
classes in our code base other than hadoop-logging module?
##########
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/conf/TestConfiguration.java:
##########
@@ -220,27 +219,21 @@ public void testFinalWarnings() throws Exception {
InputStream in2 = new ByteArrayInputStream(bytes2);
// Attach our own log appender so we can verify output
- TestAppender appender = new TestAppender();
- final Logger logger = Logger.getRootLogger();
- logger.addAppender(appender);
+ LogCapturer logCapturer =
LogCapturer.captureLogs(LoggerFactory.getLogger("root"));
Review Comment:
This is the correct way to get the root logger for slf4j logger? Just
asking, I'm not sure...
> Introduce hadoop-logging module
> -------------------------------
>
> Key: HADOOP-18207
> URL: https://issues.apache.org/jira/browse/HADOOP-18207
> Project: Hadoop Common
> Issue Type: Sub-task
> Reporter: Duo Zhang
> Assignee: Viraj Jasani
> Priority: Major
> Labels: pull-request-available
>
> There are several goals here:
> # Provide the ability to change log level, get log level, etc.
> # Place all the appender implementation(?)
> # Hide the real logging implementation.
> # Later we could remove all the log4j references in other hadoop module.
> # Move as much log4j usage to the module as possible.
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]