查看相关依赖关系,排除相关依赖,引入新的日志依赖

  slf4j+log4j的方式;

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<artifactId>logback-classic</artifactId>
<groupId>ch.qos.logback</groupId>
</exclusion>
<exclusion>
<artifactId>log4j-over-slf4j</artifactId>
<groupId>org.slf4j</groupId>
</exclusion>
</exclusions>
</dependency> <dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</dependency>

  切换为log4j2

 <dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<artifactId>spring-boot-starter-logging</artifactId>
<groupId>org.springframework.boot</groupId>
</exclusion>
</exclusions>
</dependency> <dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-log4j2</artifactId>
</dependency>

尚硅谷springboot学习19-日志切换的更多相关文章

  1. 尚硅谷springboot学习17-SpringBoot日志

    SpringBoot使用它来做日志功能: <dependency> <groupId>org.springframework.boot</groupId> < ...

  2. 尚硅谷springboot学习14-自动配置原理

    配置文件能配置哪些属性 配置文件能配置的属性参照 自动配置的原理 1).SpringBoot启动的时候加载主配置类,开启了自动配置功能 @EnableAutoConfiguration 2).@Ena ...

  3. 尚硅谷springboot学习22-Thymeleaf入门

    Thymeleaf是一种模板引擎,类似于JSP.Velocity.Freemarker

  4. 尚硅谷springboot学习18-日志使用

    默认配置 SpringBoot默认帮我们配置好了日志 //记录器 Logger logger = LoggerFactory.getLogger(getClass()); @Test public v ...

  5. 尚硅谷springboot学习15-日志框架1-入门

    引子 小张:开发一个大型系统 1.System.out.println(""):将关键数据打印在控制台:去掉?写在一个文件? ​ 2.框架来记录系统的一些运行时信息:日志框架 : ...

  6. 尚硅谷springboot学习4-helloworld探究

    1.POM文件 <parent> <groupId>org.springframework.boot</groupId> <artifactId>spr ...

  7. 尚硅谷springboot学习1-简介

    以前看过springboot的相关知识,当时偷懒没有做笔记,现在忘得已经差不多了,现在趁着过年有时间,再学习一遍,并做下笔记以备忘. 特性 Spring Boot来简化Spring应用开发,约定大于配 ...

  8. 尚硅谷springboot学习35-启动原理

    先列出几个重要的事件回调机制 配置在META-INF/spring.factories ApplicationContextInitializer SpringApplicationRunListen ...

  9. 尚硅谷springboot学习34-整合SpringData JPA

    SpringData简介

随机推荐

  1. listview 选择后高亮显示

    public class UserTypeParentAdapter extends MyBaseAdapter<UserTypeList> { private int selectIte ...

  2. Laravel 5.5 FormRequest 自定义错误消息 postman调试时X-Requested-With设为XMLHttpRequest

    Laravel 5.5 FormRequest 自定义错误消息 使用FormRequest进行表单验证,就不用让验证逻辑和控制器里面的逻辑都混在一起.但在使用的时候呢,发现json错误返回的数据,与我 ...

  3. window.open 子窗口关闭刷新父页面

    function JsMod(htmlurl,tmpWidth,tmpHeight){ htmlurl=getRandomUrl(htmlurl); var winObj = window.open( ...

  4. Unicode String to a UTF-8 TypedArray Buffer in JavaScript

    https://coolaj86.com/articles/unicode-string-to-a-utf-8-typed-array-buffer-in-javascript/

  5. MySQL 之数据库增量数据恢复案例

    MySQL 数据库增量数据恢复案例 一.场景概述 MySQL数据库每日零点自动全备 某天上午10点,小明莫名其妙地drop了一个数据库 我们需要通过全备的数据文件,以及增量的binlog文件进行数据恢 ...

  6. Redis-Migrate-Tool 使用详解

    注意:目前不支持4.0.X及以上的redis使用 Redis 集群迁移工具,基于redis复制,快速,稳定. github链接:https://github.com/vipshop/redis-mig ...

  7. Select模式和超时

    fd_set rset; FD_ZERO(&rset); int nready; int maxfd; int fd_stdin = fileno(stdin); if(fd_stdin &g ...

  8. Java基础方面

    1.作用域public,private,protected,以及不写时的区别 答:区别如下: 作用域        当前类     同一package       子孙类     其他package ...

  9. es6(14)--iterator for ...of循环

    //iterator for ...of循环 { let arr=['hello','world']; let map=arr[Symbol.iterator](); console.log(map. ...

  10. mongodb $用法,等

    1.$修改器 : $set 简单粗暴 {name:value} dict["name"]=value   $unset 简单粗暴的删除字段 {$unset:{name:1}} de ...