NutzCN Logo
问答 日志不打印,项目起不来
发布于 2473天前 作者 baby-pw 1366 次浏览 复制 上一个帖子 下一个帖子
标签:
log4j.rootLogger=debug,Console

log4j.appender.Console=org.apache.log4j.ConsoleAppender
log4j.appender.Console.layout=org.apache.log4j.PatternLayout
log4j.appender.Console.layout.ConversionPattern=[%-5p] %d{HH:mm:ss.SSS} %l - %m%n
<?xml version="1.0" encoding="UTF-8"?>
<Configuration>
    <Appenders>
        <Console name="STDOUT" target="SYSTEM_OUT">
            <PatternLayout pattern="%d{HH:mm:ss.SSS} %-5p (%F:%L) %M - %m%n"/>
        </Console>
    </Appenders>
    <Loggers>
        <Root level="debug">
            <AppenderRef ref="STDOUT"/>
        </Root>
    </Loggers>
</Configuration>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>ink.point.wash</groupId>
    <artifactId>Campus</artifactId>
    <packaging>war</packaging>
    <version>1.0-SNAPSHOT</version>
    <name>Campus Maven Webapp</name>
    <url>http://maven.apache.org</url>
    <properties>
        <!-- UTF-8-->
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>
    <dependencies>
        <!-- 核心jar -->
        <dependency>
            <groupId>org.nutz</groupId>
            <artifactId>nutz</artifactId>
            <version>1.r.65</version>
        </dependency>
        <!-- mysql驱动 -->
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>5.1.44</version>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <version>3.1.0</version>
            <scope>provided</scope>
        </dependency>
        <!-- Druid连接池 -->
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>druid</artifactId>
            <version>1.1.5</version>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
            <scope>test</scope>
        </dependency>
        <!--Log配置-->
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-core</artifactId>
            <version>2.6</version>
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-slf4j-impl</artifactId>
            <version>2.6</version>
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-1.2-api</artifactId>
            <version>2.6</version>
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-web</artifactId>
            <version>2.6</version>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.3</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                    <compilerArgs>
                        <arg>-parameters</arg>
                    </compilerArgs>
                    <useIncrementalCompilation>false</useIncrementalCompilation>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <repositories>
        <repository>
            <id>nutz</id>
            <url>http://jfrog.nutz.cn/artifactory/libs-release</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>nutz-snapshots</id>
            <url>http://jfrog.nutz.cn/artifactory/snapshots</url>
            <snapshots>
                <enabled>true</enabled>
                <updatePolicy>always</updatePolicy>
            </snapshots>
            <releases>
                <enabled>false</enabled>
            </releases>
        </repository>
    </repositories>
</project>

F:\apache-tomcat-8.0.48\bin\catalina.bat run
[2018-03-16 10:57:23,982] Artifact Campus:war exploded: Waiting for server connection to start artifact deployment...
Using CATALINA_BASE:   "C:\Users\Baby_pw\.IntelliJIdea2017.2\system\tomcat\Unnamed_Campus"
Using CATALINA_HOME:   "F:\apache-tomcat-8.0.48"
Using CATALINA_TMPDIR: "F:\apache-tomcat-8.0.48\temp"
Using JRE_HOME:        "F:\jdk1.8.0_161"
Using CLASSPATH:       "F:\apache-tomcat-8.0.48\bin\bootstrap.jar;F:\apache-tomcat-8.0.48\bin\tomcat-juli.jar"
16-Mar-2018 10:57:27.933 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Server version:        Apache Tomcat/8.0.48
16-Mar-2018 10:57:27.944 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Server built:          Nov 30 2017 16:26:50 UTC
16-Mar-2018 10:57:27.944 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Server number:         8.0.48.0
16-Mar-2018 10:57:27.945 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name:               Windows 10
16-Mar-2018 10:57:27.945 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version:            10.0
16-Mar-2018 10:57:27.945 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture:          amd64
16-Mar-2018 10:57:27.946 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home:             F:\jdk1.8.0_161\jre
16-Mar-2018 10:57:27.946 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version:           1.8.0_161-b12
16-Mar-2018 10:57:27.947 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor:            Oracle Corporation
16-Mar-2018 10:57:27.947 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE:         C:\Users\Baby_pw\.IntelliJIdea2017.2\system\tomcat\Unnamed_Campus
16-Mar-2018 10:57:27.947 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME:         F:\apache-tomcat-8.0.48
16-Mar-2018 10:57:27.948 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=C:\Users\Baby_pw\.IntelliJIdea2017.2\system\tomcat\Unnamed_Campus\conf\logging.properties
16-Mar-2018 10:57:27.948 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
16-Mar-2018 10:57:27.949 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dfile.encoding=UTF-8
16-Mar-2018 10:57:27.949 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
16-Mar-2018 10:57:27.949 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
16-Mar-2018 10:57:27.950 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs=
16-Mar-2018 10:57:27.950 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=C:\Users\Baby_pw\.IntelliJIdea2017.2\system\tomcat\Unnamed_Campus
16-Mar-2018 10:57:27.950 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=F:\apache-tomcat-8.0.48
16-Mar-2018 10:57:27.957 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=F:\apache-tomcat-8.0.48\temp
16-Mar-2018 10:57:27.958 信息 [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: F:\jdk1.8.0_161\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;F:\jdk1.8.0_161\bin;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Lenovo\FusionEngine;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\MySQL\MySQL Server 5.5\bin;"F:\jdk1.8.0_161\\bin;F:\jdk1.8.0_161\\jre\bin";";D:\apache-maven-3.5.2\bin";D:\Git\Git\cmd;C:\Users\Baby_pw\AppData\Local\Microsoft\WindowsApps;;.
16-Mar-2018 10:57:28.521 信息 [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
16-Mar-2018 10:57:29.361 信息 [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
16-Mar-2018 10:57:29.368 信息 [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
16-Mar-2018 10:57:29.378 信息 [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
16-Mar-2018 10:57:29.379 信息 [main] org.apache.catalina.startup.Catalina.load Initialization processed in 3394 ms
16-Mar-2018 10:57:29.464 信息 [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina
16-Mar-2018 10:57:29.464 信息 [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.0.48
16-Mar-2018 10:57:29.497 信息 [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
16-Mar-2018 10:57:29.552 信息 [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
16-Mar-2018 10:57:29.563 信息 [main] org.apache.catalina.startup.Catalina.start Server startup in 183 ms
16-Mar-2018 10:57:39.503 信息 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory F:\apache-tomcat-8.0.48\webapps\manager
16-Mar-2018 10:57:40.658 信息 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory F:\apache-tomcat-8.0.48\webapps\manager has finished in 1,153 ms
F:\apache-tomcat-8.0.48\bin\catalina.bat stop
Disconnected from server
Using CATALINA_BASE:   "C:\Users\Baby_pw\.IntelliJIdea2017.2\system\tomcat\Unnamed_Campus"
Using CATALINA_HOME:   "F:\apache-tomcat-8.0.48"
Using CATALINA_TMPDIR: "F:\apache-tomcat-8.0.48\temp"
Using JRE_HOME:        "F:\jdk1.8.0_161"
Using CLASSPATH:       "F:\apache-tomcat-8.0.48\bin\bootstrap.jar;F:\apache-tomcat-8.0.48\bin\tomcat-juli.jar"
16-Mar-2018 11:01:27.081 信息 [main] org.apache.catalina.core.StandardServer.await A valid shutdown command was received via the shutdown port. Stopping the Server instance.
16-Mar-2018 11:01:27.082 信息 [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-8080"]
16-Mar-2018 11:01:27.154 信息 [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["ajp-nio-8009"]
16-Mar-2018 11:01:27.215 信息 [main] org.apache.catalina.core.StandardService.stopInternal Stopping service Catalina
16-Mar-2018 11:01:27.266 信息 [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-8080"]
16-Mar-2018 11:01:27.291 信息 [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["ajp-nio-8009"]
16-Mar-2018 11:01:27.305 信息 [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-8080"]
16-Mar-2018 11:01:27.308 信息 [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["ajp-nio-8009"]

2 回复

换tomcat 8.5最新版试试

问题已解决,感谢大佬!

添加回复
请先登陆
回到顶部