From adea9593ec174fdf2a448fcfe00acbe2545f2a9f Mon Sep 17 00:00:00 2001 From: fangl <3098731433@qq.com> Date: Tue, 20 Feb 2024 10:11:02 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9D=E6=AC=A1=E4=BB=A3=E7=A0=81=E6=8F=90?= =?UTF-8?q?=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 64 +++++++++++++++++++++++++++++ src/main/java/META-INF/MANIFEST.MF | 3 ++ src/main/resources/log4j.properties | 24 +++++++++++ 3 files changed, 91 insertions(+) create mode 100644 pom.xml create mode 100644 src/main/java/META-INF/MANIFEST.MF create mode 100644 src/main/resources/log4j.properties diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..1634f40 --- /dev/null +++ b/pom.xml @@ -0,0 +1,64 @@ + + + 4.0.0 + + autoWebForCaiGou + autoWebForCaiGou + 1.0-SNAPSHOT + + + + org.apache.maven.plugins + maven-compiler-plugin + + 8 + 8 + + + + + + + org.apache.commons + commons-lang3 + 3.4 + + + + + + org.seleniumhq.selenium + selenium-java + 3.141.59 + + + + + + commons-logging + commons-logging-api + 1.1 + + + + org.slf4j + slf4j-api + 1.7.26 + + + + org.slf4j + slf4j-log4j12 + 1.7.26 + + + + cn.hutool + hutool-all + 5.8.16 + + + + \ No newline at end of file diff --git a/src/main/java/META-INF/MANIFEST.MF b/src/main/java/META-INF/MANIFEST.MF new file mode 100644 index 0000000..1d285bc --- /dev/null +++ b/src/main/java/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Main-Class: com.bonus.autoweb.TestMain + diff --git a/src/main/resources/log4j.properties b/src/main/resources/log4j.properties new file mode 100644 index 0000000..66ea144 --- /dev/null +++ b/src/main/resources/log4j.properties @@ -0,0 +1,24 @@ +### 设置### +log4j.rootLogger = debug,stdout,D,E + +### 输出信息到控制抬 ### +log4j.appender.stdout = org.apache.log4j.ConsoleAppender +log4j.appender.stdout.Target = System.out +log4j.appender.stdout.layout = org.apache.log4j.PatternLayout +log4j.appender.stdout.layout.ConversionPattern = [%-5p] %d{yyyy-MM-dd HH:mm:ss,SSS} method:%l%n%m%n + +### 输出DEBUG 级别以上的日志到=E://logs/error.log ### +log4j.appender.D = org.apache.log4j.DailyRollingFileAppender +log4j.appender.D.File = logs/log.log +log4j.appender.D.Append = true +log4j.appender.D.Threshold = DEBUG +log4j.appender.D.layout = org.apache.log4j.PatternLayout +log4j.appender.D.layout.ConversionPattern = %-d{yyyy-MM-dd HH:mm:ss} [ %t:%r ] - [ %p ] %m%n + +### 输出ERROR 级别以上的日志到=E://logs/error.log ### +log4j.appender.E = org.apache.log4j.DailyRollingFileAppender +log4j.appender.E.File =logs/error.log +log4j.appender.E.Append = true +log4j.appender.E.Threshold = ERROR +log4j.appender.E.layout = org.apache.log4j.PatternLayout +log4j.appender.E.layout.ConversionPattern = %-d{yyyy-MM-dd HH:mm:ss} [ %t:%r ] - [ %p ] %m%n \ No newline at end of file