在Tibco BW/Designer中更改Log4J配置没有达到预期的效果 [英] Changing Log4J configuration in Tibco BW/Designer does not have the desired effect

查看:182
本文介绍了在Tibco BW/Designer中更改Log4J配置没有达到预期的效果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在Tibco BW/Designer中设置自定义Log4J附加器.

I tried to setup custom Log4J appenders in Tibco BW/Designer.

我在<tibco_folder>/bw/5.11/lib/log4j.xml中添加了以下附加程序:

I added to <tibco_folder>/bw/5.11/lib/log4j.xml the following appender:

<appender name="TestFile" class="org.apache.log4j.FileAppender">
    <param name="file" value="d:/temp/tibco-test.log"/>
    <param name="Threshold" value="DEBUG"/>
    <param name="append" value="true"/>
    <layout class="org.apache.log4j.PatternLayout">
        <param name="ConversionPattern" value="%d{yyyy MMM dd HH:mm:ss:SSS 'GMT'} %X{offset} %X{engine} %X{role} [%X{msgCategory}] %X{msgcode} %m %n"/>
    </layout>
</appender>

,然后将<appender-ref ref="TestFile"/>添加到每个记录器,包括tibco_bw_log appender旁的bw.logger.邮件将发送到tibco_bw_log,但不会发送到我的附加程序.

and then I added <appender-ref ref="TestFile"/> to each logger, including bw.logger, beside the tibco_bw_log appender. The messages are sent to tibco_bw_log, but not to my appender.

我的附加器仅收到一些如下所示的日志,未显示在tibco_bw_log附加器(c:\Users\<me>\.TIBCO\logs\<app_name>.log)中的日志

My appender is getting only some logs like the below, logs that don't appear in tibco_bw_log appender (c:\Users\<me>\.TIBCO\logs\<app_name>.log)

2017 Feb 21 17:05:16:693 GMT    []  no system property set, defaulting to entrust61 since got class com.entrust.toolkit.security.provider.Initializer 
2017 Feb 21 17:05:16:698 GMT    []  getVendor()=entrust61 
2017 Feb 21 17:05:16:719 GMT    []  Initializing Entrust crypto provider in NON FIPS 140-2 mode; insert provider as normal 
2017 Feb 21 17:05:17:302 GMT    []  using X9_31usingDESede 
2017 Feb 21 17:05:18:021 GMT    []  getVendor()=entrust61 
2017 Feb 21 17:05:18:023 GMT    []  Initialized crypto vendor entrust61 
java.lang.Exception: FOR TRACING ONLY -- NOT AN ERROR
at com.tibco.security.impl.new.F.init(CryptoVendor.java:69)
...

即使我从bw.logger中删除了tibco_bw_log附加程序,日志仍然在那里并且没有记录到我的记录器中.我将附加程序名称更改为tibco_bw_log,并删除了原始附加程序,但随后出现错误:"org.apache.log4j.FileAppender无法转换为com.tibco.share.util.BWLogFileAppender".

Even if I remove the tibco_bw_log appender from bw.logger, the logs are still going there and not to my logger. I changed my appender name to tibco_bw_log and removed the original appender, but then I was getting the error: "org.apache.log4j.FileAppender cannot be cast to com.tibco.share.util.BWLogFileAppender".

现在我什至没有得到这个错误,但是我的追加器没有任何日志.

Now I don't even get that error, but my appender does not get any logs.

每次更改log4j.xml文件时,我都会重新启动Designer.我还对log4j.properties应用了相同的更改,甚至将其删除了.似乎log4j.xml仍然是优先事项.

Every time I changed the log4j.xml file, I restarted the Designer. I also applied the same changes to log4j.properties and even removed it. It seems that log4j.xml is taking priority anyway.

我还尝试在bwengine.xml中为bw.log4j.configuration指定bwengine.xmllog4j.xml的完整路径,并添加以下两个属性(如

I also tried to specify the full path of log4j.xml in bwengine.xml for bw.log4j.configuration and adding the two below properties (as shown here) - no effect.

<property>
       <name>bw.engine.showInput</name>
       <option>bw.log4j.configuration</option>
       <default>true</default>
       <description>Log4j Configuration file path</description>
</property>
<property>
       <name>bw.engine.showOutput</name>
       <option>bw.log4j.configuration</option>
       <default>true</default>
       <description>Log4j Configuration file path</description>
</property>

我正在使用BW 5.11和Designer 5.8.

I'm using BW 5.11 and Designer 5.8.

我想念什么?

推荐答案

不幸的是,这在Tibco中是不可能的.自定义记录器只能使用Java活动.

Unfortunately this is not possible in Tibco. Only Java activities can be used with custom loggers.

这篇关于在Tibco BW/Designer中更改Log4J配置没有达到预期的效果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆