我正在使用Log4j Http附加程序通过m子cloudhub将数据发送到Splunk。在构建过程中,它会解决错误:
错误Appenders包含无效的元素或属性Http
我没有在Splunk中看到数据。
该错误发生在Log4j配置中:
<Http name="Splunktest" url="myurl" token="mytoken"
disableCertificateValidation="true"></Http>
在Maven构建期间,它抛出了所提到的错误。 Mule运行时版本3.8.4
其他人也遇到同样的错误吗?
整个Log4j供参考
<!--These are some of the loggers you can enable.
There are several more you can find in the documentation.
Besides this log4j configuration, you can also use Java VM environment variables
to enable other logs like network (-Djavax.net.debug=ssl or all) and
Garbage Collector (-XX:+PrintGC). These will be append to the console, so you will
see them in the mule_ee.log file. -->
<Appenders>
<RollingFile name="file" fileName="${sys:mule.home}${sys:file.separator}logs${sys:file.separator}splunk.log"
filePattern="${sys:mule.home}${sys:file.separator}logs${sys:file.separator}splunk-%i.log">
<PatternLayout pattern="%d [%t] %-5p %c - %m%n" />
<SizeBasedTriggeringPolicy size="10 MB" />
<DefaultRolloverStrategy max="10"/>
</RollingFile>
<Http name="Splunktest" url="myurl" token="mytoken" disableCertificateValidation="true"></Http>
</Appenders>
<Loggers>
<!-- Http Logger shows wire traffic on DEBUG -->
<AsyncLogger name="org.mule.module.http.internal.HttpMessageLogger" level="WARN"/>
<!-- JDBC Logger shows queries and parameters values on DEBUG -->
<AsyncLogger name="com.mulesoft.mule.transport.jdbc" level="WARN"/>
<!-- CXF is used heavily by Mule for web services -->
<AsyncLogger name="org.apache.cxf" level="WARN"/>
<!-- Apache Commons tend to make a lot of noise which can clutter the log-->
<AsyncLogger name="org.apache" level="WARN"/>
<!-- Reduce startup noise -->
<AsyncLogger name="org.springframework.beans.factory" level="WARN"/>
<!-- Mule classes -->
<AsyncLogger name="org.mule" level="INFO"/>
<AsyncLogger name="com.mulesoft" level="INFO"/>
<!-- Reduce DM verbosity -->
<AsyncLogger name="org.jetel" level="WARN"/>
<AsyncLogger name="Tracking" level="WARN"/>
<AsyncRoot level="INFO">
<AppenderRef ref="file" />
</AsyncRoot>
<AsyncLogger name="splunk.logger" level="INFO" >
<AppenderRef ref="Splunktest" />
</AsyncLogger>
</Loggers>