最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

What is the log4j.xml edits to either remove or to modify the out-of-the-box rolling appender for Pentaho 8.3 CE? - Stack Overfl

programmeradmin1浏览0评论

I have a fresh install of pdi-ce-8.3.0.0-371 on a RedHat LINUX server.

The default log4j.xml file resides in the classpath at: ./data-integration/classes/log4j.xml

We're using: Java - openjdk version "1.8.0_412"

When executing a Pentaho job there is either warning or a stacktrace. (See details below.)

The out-of-the-box log4j.xml file contains an appender: pdi-execution-appender. It's a template for a rolling appender. Instead we want it to be a console appender.

  1. What is the minimal log4j.xml edit for that?

  2. WIs there an explanation for sometimes there being a WARNING - but other times getting a STACKTRACE?

  3. How can the stacktrace issue be resolved?


 


<appender name="pdi-execution-appender" class=".apache.log4j.rolling.RollingFileAppender">
    <rollingPolicy class=".apache.log4j.rolling.TimeBasedRollingPolicy">
      <param name="ActiveFileName"  value="logs/pdi.log" />
      <param name="FileNamePattern" value="logs/pdi.%d{yyyy-MM-dd}.log" />
    </rollingPolicy>
    <layout class=".apache.log4j.PatternLayout">
      <param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:ss.SSS} %-5p <%t> %m%n"/>
    </layout>
  </appender>
 
**WARNING**
#######################################################################
OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
log4j:WARN Continuable parsing error 45 and column 76
log4j:WARN Element type "rollingPolicy" must be declared.
log4j:WARN Continuable parsing error 52 and column 14
log4j:WARN The content of element type "appender" must match "(errorHandler?,param*,layout?,filter*,appender-ref*)".
log4j:WARN Please set a rolling policy for the RollingFileAppender named 'pdi-execution-appender'


**STACKTRACE**
DEBUG: PENTAHO_INSTALLED_LICENSE_PATH=
OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
log4j:ERROR Could not create an Appender. Reported error follows.
java.lang.ClassCastException: .apache.log4j.ConsoleAppender cannot be cast to .apache.log4j.Appender
        at .apache.log4j.xml.DOMConfigurator.parseAppender(DOMConfigurator.java:248)
        at .apache.log4j.xml.DOMConfigurator.findAppenderByName(DOMConfigurator.java:176)
        at .apache.log4j.xml.DOMConfigurator.findAppenderByReference(DOMConfigurator.java:191)
        at .apache.log4j.xml.DOMConfigurator.parseChildrenOfLoggerElement(DOMConfigurator.java:523)
        at .apache.log4j.xml.DOMConfigurator.parseCategory(DOMConfigurator.java:436)
        at .apache.log4j.xml.DOMConfigurator.parse(DOMConfigurator.java:1004)
        at .apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:872)
        at .apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:755)
        at .apache.log4j.xml.DOMConfigurator.configure(DOMConfigurator.java:896)
        at .pentaho.di.core.logging.log4j.Log4jLogging.applyLog4jConfiguration(Log4jLogging.java:81)
        at .pentaho.di.core.logging.log4j.Log4jLogging.createLogger(Log4jLogging.java:89)
        at .pentaho.di.core.logging.log4j.Log4jLogging.init(Log4jLogging.java:68)
        at .pentaho.di.core.KettleClientEnvironment.initLogginPlugins(KettleClientEnvironment.java:141)
        at .pentaho.di.core.KettleClientEnvironment.init(KettleClientEnvironment.java:104)
        at .pentaho.di.kitchen.Kitchen$1.call(Kitchen.java:89)
        at .pentaho.di.kitchen.Kitchen$1.call(Kitchen.java:83)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
 

From the get go I was unclear what log4j.xml edits to try. Deploying edits to the LINUX server take 30 minutes.

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论