0
私はWildfly 9/10で作業しています。 自分のカスタムLog4j2設定ファイルでWebアプリケーションを作成しました。Log4j2 WildFly 9ログファイルが空です。
<configuration status="INFO">
<Appenders>
<RollingFile name="General" fileName="D:/logs/general/general.log"
filePattern="D:/logs/general/$${date:yyyy-MM}/general-%d{MM-dd-yyyy}-%i.log.gz">
<PatternLayout
pattern="%d{ABSOLUTE} %level{length=5} [%thread] %logger{1} - %msg%n" />
<SizeBasedTriggeringPolicy size="20 MB" />
</RollingFile>
<Async name="asyncGeneral" bufferSize="10" includeLocation="true">
<AppenderRef ref="General" />
</Async>
</Appenders>
<Loggers>
<Root level="INFO">
<AppenderRef ref="asyncGeneral" />
</Root>
</Loggers>
設定ファイルが正しく戦争ジャーlibの内部に含まれています。
D:/logs/general.log
しかし、ファイルを空のままに保ちながら、それは、サーバコンソールにログを印刷し続けて:
結果は、私は、Webアプリケーションを実行すると、それはファイルを生成していることです。
スタンドアロンアプリケーションでも同じ設定が有効です。 私は何が欠けていますか?
UPDATE 私は自分のアプリケーションをデプロイするサーバーを印刷このデバッグレベルの情報:
は12:58:17,190 INFO [stdout] (ServerService Thread Pool -- 64) 2016-06-16 12:58:17,190 ServerService Thread Pool -- 64 DEBUG createAppender(={General}, errorRef="null", blocking="true", shutdownTimeout="0", bufferSize="10", name="asyncGeneral", includeLocation="true", Filter=null, Configuration(vfs:/C:/Windows/System32/content/sec-api.war/WEB-INF/lib/com.application.jar/log4j2.xml), ignoreExceptions="true")
12:58:17,194 INFO [stdout] (ServerService Thread Pool -- 64) 2016-06-16 12:58:17,194 ServerService Thread Pool -- 64 DEBUG createAppenders(={Console, RoutingAppender, General,asyncGeneral})
12:58:17,196 INFO [stdout] (ServerService Thread Pool -- 64) 2016-06-16 12:58:17,196 ServerService Thread Pool -- 64 DEBUG reateAppenderRef(ref="asyncGeneral", level="null", Filter=null)
12:58:17,200 INFO [stdout] (ServerService Thread Pool -- 64) 2016-06-16 12:58:17,200 ServerService Thread Pool -- 64 DEBUG createLogger(additivity="null", level="DEBUG", includeLocation="null", ={async, asyncGeneral, asyncDebug}, ={}, Configuration(vfs:/C:/Windows/System32/content/sec-api.war/WEB-INF/lib/com.klopotek.core-1.3.0-SNAPSHOT.jar/log4j2.xml), Filter=null)
12:58:17,225 INFO [stdout] (ServerService Thread Pool -- 64) 2016-06-16 12:58:17,224 ServerService Thread Pool -- 64 DEBUG Registering MBean org.apache.logging.log4j2:type=/sec-api,component=AsyncAppenders,name=asyncGeneral
ステータスをINFOからDEBUGに変更してください。次に、Jiraの問題を作成し、設定ファイルを添付してJiraの問題にログすることをお勧めします。可能であれば、問題を再現するために実行することができるサンプルプロジェクトを提供する方がより良いでしょう。 – rgoers
あなたは単にそれがバグであることを意味しますか?私は野生の標準的な伐採を除外するために必要なperhepsを読むいくつかの記事を読む – Alex
私はそれが上記の情報でバグかどうか言うことができません。 willdflyを設定する必要があるかもしれません。もしそうなら、私はLog4jサイトでそれを入手したいと思います。 – rgoers