Skip to content

Commit

Permalink
最终提交
Browse files Browse the repository at this point in the history
  • Loading branch information
yunbocheng committed Sep 10, 2021
1 parent 7f79488 commit 1402ad7
Show file tree
Hide file tree
Showing 10 changed files with 103 additions and 180 deletions.
2 changes: 1 addition & 1 deletion .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions JCL/JCl.iml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
Expand All @@ -14,7 +14,11 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.11" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
<orderEntry type="library" name="Maven: junit:junit:4.11" level="project" />
<orderEntry type="library" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
<orderEntry type="library" name="Maven: mysql:mysql-connector-java:8.0.26" level="project" />
<orderEntry type="library" name="Maven: com.google.protobuf:protobuf-java:3.11.4" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:jcl-over-slf4j:1.7.25" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.25" level="project" />
</component>
</module>
64 changes: 15 additions & 49 deletions JCL/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,68 +8,34 @@
<artifactId>JCl</artifactId>
<version>1.0-SNAPSHOT</version>

<name>JCl</name>
<!-- FIXME change it to the project's website -->
<url>http://www.example.com</url>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>

<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.26</version>
<scope>compile</scope>
</dependency>

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>1.7.25</version>
</dependency>
</dependencies>

<build>
<pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
<plugins>
<!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle -->
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>3.1.0</version>
</plugin>
<!-- default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging -->
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.2</version>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.1</version>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>3.0.2</version>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>2.5.2</version>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
</plugin>
<!-- site lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#site_Lifecycle -->
<plugin>
<artifactId>maven-site-plugin</artifactId>
<version>3.7.1</version>
</plugin>
<plugin>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>3.0.0</version>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
13 changes: 0 additions & 13 deletions JCL/src/main/java/com/yunbocheng/App.java

This file was deleted.

36 changes: 0 additions & 36 deletions JCL/src/main/java/com/yunbocheng/Test.java

This file was deleted.

9 changes: 0 additions & 9 deletions JCL/src/main/java/com/yunbocheng/Test01.java

This file was deleted.

34 changes: 0 additions & 34 deletions JCL/src/main/java/com/yunbocheng/father.java

This file was deleted.

4 changes: 1 addition & 3 deletions JCL/src/main/java/com/yunbocheng/入门案例.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
package com.yunbocheng;


import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.junit.jupiter.api.Test;

import org.junit.Test;

public class 入门案例 {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,28 @@
package com.yunbocheng;

import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class AsyncLogger方式实现混合异步 {
@Test
public void test01(){
/*
*
* */
Logger logger = LoggerFactory.getLogger(AsyncLogger方式实现全局刷新.class);
// slf4j 中存在5种日志输出级别,此时使用是slf4j的记录器,而不是log4j2的,所以只能输出slf4j中的五种级别。
for (int i = 0; i < 100; i++) {
logger.error("error信息");
logger.warn("warn信息");
logger.info("info信息");
logger.debug("debug信息");
logger.trace("trace信息");
}

// 系统业务逻辑
for (int i = 0; i < 100; i++) {
System.out.println("-----------");
}
}
}
95 changes: 63 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,48 +27,80 @@

## 三、清单

### 2.JUL
### 1. Java日志框架简介

- [日志框架简介](./日志介绍.md)

### 2. Log4j

- [入门案例以及日志级别](Log4jTest/src/main/java/com/yunbocheng/入门案例以及日志级别.java)
- [配置文件-输出到控制台](Log4jTest/src/main/java/com/yunbocheng/配置文件_输出到控制台.java)
- [日志信息输出到文件](Log4jTest/src/main/java/com/yunbocheng/日志信息输出到文件.java)
- [日志持久化(数据存储到数据库)](Log4jTest/src/main/java/com/yunbocheng/日志持久化_将数据存储到数据库.java)
- [自定义Logger配置](Log4jTest/src/main/java/com/yunbocheng/自定义Logger配置.java)
- [Log4j配置文件(log4j.properties)](Log4jTest/src/main/resources/log4j.properties)
- [pom.xml](Log4jTest/pom.xml)

### 3. JUL

- [入门案例以及默认级别](./JUL/src/com/yunbocheng/JUL/入门以及默认级别展示.java)
- [JUL配置文件](./JUL/src/com/yunbocheng/JUL/JUL配置文件.java)
- [自定义日志级别](./JUL/src/com/yunbocheng/JUL/追加日志信息.java)
- [JUL-Logger中的父子关系](./JUL/src/com/yunbocheng/JUL/JULLogger中的父子关系.java)
- [追加日志信息](./JUL/src/com/yunbocheng/JUL/追加日志信息.java)


### 1.Log4j

- [Log4j配置文件](E:\JavaProject\journal\Log4jTest\src\main\resources\log4j.properties)
- [入门案例以及日志级别](./src/main/java/com/yunbocheng/入门案例以及日志级别.java)
- [日志信息输出到文件](./com/yunbocheng/日志信息输出到文件.java)
- [配置文件-输出到控制台](./com/yunbocheng/配置文件_输出到控制台.java)
- [配置文件-输出到控制台](./com/yunbocheng/配置文件_输出到控制台.java)
### 4. JCL

- [入门案例](JCL/src/main/java/com/yunbocheng/入门案例.java)
- [配置文件(log4j.properties)](JCL/src/main/resources/log4j.properties)
- [pom.xml](JCL/pom.xml)

### 5.SLF4J

- [入门案例](SLF4J/src/main/java/com/yumbocheng/入门案例.java)
- [打印异常信息](SLF4J/src/main/java/com/yumbocheng/打印异常信息.java)
- [sfl4j_nop禁止日志打印](SLF4J/src/main/java/com/yumbocheng/sfl4j_nop禁止日志打印.java)
- [SFL4J日志集成的分类](SLF4J/src/main/java/com/yumbocheng/SFL4J日志集成的分类.java)
- [SLF4J集成log4j的方法](SLF4J/src/main/java/com/yumbocheng/SLF4J集成log4j的方法.java)
- [SLF4J集成JUL](SLF4J/src/main/java/com/yumbocheng/SLF4J集成JUL.java)
- [日志重构](SLF4J/src/main/java/com/yumbocheng/日志重构.java)
- [配置文件(log4j.properties)](SLF4J/src/main/resources/log4j.properties)
- [pom.xml](SLF4J/pom.xml)

### 6.Logback

- [入门案例](Logback/src/main/java/com/yunbocheng/入门案列.java)
- [Logback配置文件](Logback/src/main/java/com/yunbocheng/Logback配置文件.java)
- [将日志信息打印到指定文件](Logback/src/main/java/com/yunbocheng/将日志信息打印到指定文件.java)
- [日志输出为html文件](Logback/src/main/java/com/yunbocheng/日志输出为html文件.java)
- [日志的拆分和归档操作](Logback/src/main/java/com/yunbocheng/日志的拆分和归档操作.java)
- [使用过滤器更细粒度的打印日志](Logback/src/main/java/com/yunbocheng/使用过滤器更细粒度的打印日志.java)
- [异步日志](Logback/src/main/java/com/yunbocheng/异步日志.java)
- [配置文件(logback.xml)](Logback/src/main/resources/logback.xml)
- [pom.xml](Logback/pom.xml)

### 7.Log4j2

- [入门案例](Log4j2/src/main/java/com/yunbocheng/入门案例.java)
- [Log4j2基础标签](Log4j2/src/main/java/com/yunbocheng/Log4j2基础标签.java)
- [Log4j2与SLF4J联合使用](Log4j2/src/main/java/com/yunbocheng/Log4j2与SLF4J联合使用.java)
- [日志文件输出](Log4j2/src/main/java/com/yunbocheng/日志文件输出.java)
- [log4j2日志拆分](Log4j2/src/main/java/com/yunbocheng/log4j2日志拆分.java)
- [异步实现使用AsyncAppender](Log4j2/src/main/java/com/yunbocheng/异步实现使用AsyncAppender.java)
- [AsyncLogger方式实现全局刷新](Log4j2/src/main/java/com/yunbocheng/AsyncLogger方式实现全局刷新.java)
- [AsyncLogger方式实现混合异步](Log4j2/src/main/java/com/yunbocheng/AsyncLogger方式实现混合异步.java)
- [配置文件(logback.xml)](Log4j2/src/main/resources/log4j2.xml)
- [全局异步配置文件(log4j2.component.properties)](Log4j2/src/main/resources/log4j2.component.properties)
- [pom.xml](Log4j2/pom.xml)


### 3. jQuery


- [第一个jQuery网页](./JQuery语法以及测试程序/src/jqury/第一个jQuery网页.html)
- [DOM对象转化为jQuery对象](./JQuery语法以及测试程序/src/jqury/DOM对象转化为jQuery对象.html)
- [jQuery对象转换为DOM对象](./JQuery语法以及测试程序/src/jqury/jQuery对象转换为DOM对象.html)
- [jQuery绑定事件与基本过滤器](./JQuery语法以及测试程序/src/jqury/jQuery绑定事件与基本过滤器.html)
- [on 事件绑定](./JQuery语法以及测试程序/src/jqury/on事件绑定.html)
- [表单对象属性过滤器](./JQuery语法以及测试程序/src/jqury/表单对象属性过滤器.html)
- [表单选择器与jQuery函数](./JQuery语法以及测试程序/src/jqury/表单选择器与jQuery函数.html)
- [jQuery库函数hide函数等](./JQuery语法以及测试程序/src/jqury/jQuery库函数hide函数等.html)
- [JQuery概念](./JQuery概念.md)
- [jQuery思维导图](./jQuery思维导图.pdf)
- [jQuery官方文档](./JQuery语法以及测试程序/src/jqury/jquery-3.6.0.js)

### 4.省市级联查询项目

- [省市级联查询](./Jquery和Ajax实现省市级联查询)

## 四、参考文献

W3C在线文档 :
在线文档 :

> - [SLF4J官方文档](http://www.slf4j.org/)
> - [Maven中央仓库](https://mvnrepository.com/)
> - [W3C官方文档](https://tomcat.apache.org/tomcat-5.5-doc/servletapi/)

## 五、反馈及改进

Expand All @@ -90,8 +122,7 @@ W3C在线文档 :

## 八、致谢

> 1. 感谢动力节点提供的Ajax在线课程视频资料 [Ajax在线课程](https://www.bilibili.com/video/BV15k4y167XM)
> 2. 感谢动力节点提供的JQuery在线课程视频资料 [JQuery在线课程](https://www.bilibili.com/video/BV1Jg4y1B7n4)
> 1. 感谢动力节点提供的Java日志在线课程视频资料 [Java日志在线课程](https://www.bilibili.com/video/BV1Mb4y1Z74W)
> 2. 感谢JetBrains提供的配套开发环境许可证 [官方网站](https://www.jetbrains.com/)
> 3. 感谢Gitee提供的图床平台 [相关地址](https://gitee.com/YunboCheng/imageBad)

0 comments on commit 1402ad7

Please sign in to comment.