You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@kyuubi.apache.org by "yaooqinn (via GitHub)" <gi...@apache.org> on 2023/04/04 05:51:31 UTC

[GitHub] [kyuubi] yaooqinn commented on a diff in pull request #4653: [KYUUBI 4650][Improvement] LogDivertAppender supports reading RollingFileAppender pattern

yaooqinn commented on code in PR #4653:
URL: https://github.com/apache/kyuubi/pull/4653#discussion_r1156758448


##########
kyuubi-common/src/main/scala/org/apache/kyuubi/operation/log/Log4j2DivertAppender.scala:
##########
@@ -91,7 +91,9 @@ object Log4j2DivertAppender {
   def initLayout(): StringLayout = {
     LogManager.getRootLogger.asInstanceOf[org.apache.logging.log4j.core.Logger]
       .getAppenders.values().asScala
-      .find(ap => ap.isInstanceOf[ConsoleAppender] && ap.getLayout.isInstanceOf[StringLayout])
+      .find(ap =>
+        (ap.isInstanceOf[ConsoleAppender] || ap.isInstanceOf[RollingFileAppender])
+          && ap.getLayout.isInstanceOf[StringLayout])

Review Comment:
   ```suggestion
           (ap.isInstanceOf[ConsoleAppender] || ap.isInstanceOf[RollingFileAppender]) &&
             ap.getLayout.isInstanceOf[StringLayout])
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org