1

現在、slf4j を使用して jetty 8 の集中ログを構成しようとしています。次の [チュートリアル][1] を見つけましたが、jetty 8 では動作しないようです。jetty 8 でこれを行う方法を知っている人はいますか?

解決:

jetty-webapp-logging.xml には、次の内容が含まれている必要があります。

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">

<!-- =============================================================== -->
<!-- Enable Centralized Logging in the Jetty Server                  -->
<!-- =============================================================== -->

<Configure id="Server" class="org.eclipse.jetty.server.Server">
  <Ref id="DeploymentManager">
    <Call name="addLifeCycleBinding">
      <Arg>
        <New class="org.mortbay.jetty.webapp.logging.CentralizedWebAppLoggingBinding">
        </New>
      </Arg>
    </Call>
  </Ref>
</Configure>
4

1 に答える 1