Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/logging/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
登录到Jetty Maven插件版本9的标准输出_Maven_Logging_Jetty_Maven Jetty Plugin - Fatal编程技术网

登录到Jetty Maven插件版本9的标准输出

登录到Jetty Maven插件版本9的标准输出,maven,logging,jetty,maven-jetty-plugin,Maven,Logging,Jetty,Maven Jetty Plugin,我试图查看Jetty Maven插件版本9中的详细调试信息,以便诊断一个不相关的错误。我在这里看过一篇描述版本7的文章,还有一篇描述使用logback进行日志记录的文章。我尝试了上面提到的建议,包括在命令行和pom.xml中的插件配置下设置各种系统属性。我还尝试在pom.xml中的插件下添加各种依赖项。这些建议似乎都不管用,我想知道我是做错了什么,还是在最新版本中做了什么改变。不管我输入了什么,标准输出中都没有显示详细的日志信息。(见下文)。此时,我甚至不需要与logback或log4j集成。我

我试图查看Jetty Maven插件版本9中的详细调试信息,以便诊断一个不相关的错误。我在这里看过一篇描述版本7的文章,还有一篇描述使用logback进行日志记录的文章。我尝试了上面提到的建议,包括在命令行和pom.xml中的插件配置下设置各种系统属性。我还尝试在pom.xml中的插件下添加各种依赖项。这些建议似乎都不管用,我想知道我是做错了什么,还是在最新版本中做了什么改变。不管我输入了什么,标准输出中都没有显示详细的日志信息。(见下文)。此时,我甚至不需要与logback或log4j集成。我所需要的只是任何类型的日志记录——标准输出或标准错误都可以。我知道我缺少一些基本的东西。以下是相关信息

命令:

mvn jetty:run
pom.xml:

<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
     xmlns="http://maven.apache.org/POM/4.0.0"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<modelVersion>4.0.0</modelVersion>
<groupId>me.question</groupId>
<artifactId>question1</artifactId>
<version>1.0.1-SNAPSHOT</version>
<packaging>war</packaging>

<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>


<build>
    <plugins>

        <plugin>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-maven-plugin</artifactId>
            <version>9.4.6.v20170531</version>
            <configuration>
                <webApp>

                    <!--
                    <defaultsDescriptor>src/main/webapp/resources/webdefault.xml</defaultsDescriptor>
                    -->
                </webApp>
                <httpConnector>
                    <port>8080</port>
                </httpConnector>
                <stopKey>jetty-stop</stopKey>
                <stopPort>54326</stopPort>

                <systemProperties>


                </systemProperties>
            </configuration>

            <dependencies>

            </dependencies>

        </plugin>

    </plugins>
</build>

我知道出了什么问题。我试图在jetty maven插件中设置系统属性,而不是事先使用properties maven插件。以下是我在pom.xml中的内容:

        <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>properties-maven-plugin</artifactId>
            <version>1.0.0</version>
            <executions>
                <execution>
                    <goals>
                        <goal>set-system-properties</goal>
                    </goals>
                    <configuration>
                        <properties>
                            <property>
                                <name>org.eclipse.jetty.util.log.class</name>
                                <value>org.eclipse.jetty.util.log.StdErrLog</value>
                            </property>
                            <property>
                                <name>org.eclipse.jetty.LEVEL</name>
                                <value>DEBUG</value>
                            </property>
                        </properties>
                    </configuration>
                </execution>
            </executions>
        </plugin>
        <plugin>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-maven-plugin</artifactId>
            <version>9.3.20.v20170531</version>
            <configuration>
                <webApp>
                    <baseResource implementation="org.eclipse.jetty.util.resource.ResourceCollection">
                        <resourcesAsCSV>
                            src/main/webapp
                        </resourcesAsCSV>
                    </baseResource>
                </webApp>
                <httpConnector>
                    <port>8080</port>
                </httpConnector>
                <useTestScope>false</useTestScope>
                <stopKey>foo</stopKey>
                <stopPort>52042</stopPort>
            </configuration>
        </plugin>

org.codehaus.mojo
属性maven插件
1.0.0
设置系统属性
org.eclipse.jetty.util.log.class
org.eclipse.jetty.util.log.StdErrLog
org.eclipse.jetty.LEVEL
调试
org.eclipse.jetty
jetty maven插件
9.3.20.v20170531
src/main/webapp
8080
假的
福
52042
        <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>properties-maven-plugin</artifactId>
            <version>1.0.0</version>
            <executions>
                <execution>
                    <goals>
                        <goal>set-system-properties</goal>
                    </goals>
                    <configuration>
                        <properties>
                            <property>
                                <name>org.eclipse.jetty.util.log.class</name>
                                <value>org.eclipse.jetty.util.log.StdErrLog</value>
                            </property>
                            <property>
                                <name>org.eclipse.jetty.LEVEL</name>
                                <value>DEBUG</value>
                            </property>
                        </properties>
                    </configuration>
                </execution>
            </executions>
        </plugin>
        <plugin>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-maven-plugin</artifactId>
            <version>9.3.20.v20170531</version>
            <configuration>
                <webApp>
                    <baseResource implementation="org.eclipse.jetty.util.resource.ResourceCollection">
                        <resourcesAsCSV>
                            src/main/webapp
                        </resourcesAsCSV>
                    </baseResource>
                </webApp>
                <httpConnector>
                    <port>8080</port>
                </httpConnector>
                <useTestScope>false</useTestScope>
                <stopKey>foo</stopKey>
                <stopPort>52042</stopPort>
            </configuration>
        </plugin>