log4j2.x 配置文件默认寻找顺序
Automatic Configuration
Log4j has the ability to automatically configure itself during initialization. When Log4j starts it will locate all the ConfigurationFactory plugins and arrange then in weighted order from highest to lowest. As delivered, Log4j contains three ConfigurationFactory implementations: one for JSON, one for YAML, and one for XML.
- Log4j will inspect the "log4j.configurationFile" system property and, if set, will attempt to load the configuration using the ConfigurationFactory that matches the file extension.
- If no system property is set the YAML ConfigurationFactory will look for log4j2-test.yaml or log4j2-test.yml in the classpath.
- If no such file is found the JSON ConfigurationFactory will look for log4j2-test.json or log4j2-test.jsn in the classpath.
- If no such file is found the XML ConfigurationFactory will look for log4j2-test.xml in the classpath.
- If a test file cannot be located the YAML ConfigurationFactory will look for log4j2.yaml or log4j2.yml on the classpath.
- If a YAML file cannot be located the JSON ConfigurationFactory will look for log4j2.json or log4j2.jsn on the classpath.
- If a JSON file cannot be located the XML ConfigurationFactory will try to locate log4j2.xml on the classpath.
- If no configuration file could be located the DefaultConfiguration will be used. This will cause logging output to go to the console.
ref: http://logging.apache.org/log4j/2.x/manual/configuration.html
没细看,应该默认不支持properites了
log4j2.x 配置文件默认寻找顺序的更多相关文章
- springcloud的配置文件的读取顺序
SpringBoot默认支持properties和YAML两种格式的配置文件.前者格式简单,但是只支持键值对.如果需要表达列表,最好使用YAML格式.SpringBoot支持自动加载约定名称的配置文件 ...
- $Django importlib与dir知识,手写配置文件, 配置查找顺序 drf分页器&drf版本控制
1 importlib与dir知识 # importlib简介动态导入字符串模块 # 常规导入 from ss.aa import b from ss import a print(b,type(b ...
- log4j2的配置文件log4j2.xml笔记
一.背景 最近由于项目的需要,我们把log4j 1.x的版本全部迁移成log4j 2.x 的版本,那随之而来的slf4j整合log4j的配置(使用Slf4j集成Log4j2构建项目日志系统的完美解决方 ...
- struts几个配置文件加载顺序_2015.01.04
struts几个配置文件加载顺序: 01:struts-default.xml 02:struts-plugin.xml 03:struts.xml 04:struts.properties 05:w ...
- bash 的配置文件加载顺序
bash配置文件的加载顺序和登陆方式有关,下面先介绍下登陆方式. 1 登陆方式有2种 登陆式SHELL: su - oracle su -l oracle 正常从终端登陆 非登录式SHELL: ...
- Linux之Ubuntu与Windows更改默认启动顺序[转载]
装双系统后,经常会遇到与Windows更改默认启动顺序的需要,这样有助于开机时可以避免手动选择经常使用的系统了. 当然这解决办法不是博主的主意,本文纯属抄録者,故文章题目也声明了是转载,解决方案如下叙 ...
- Unity3d中默认函数调用顺序(MonoBehaviour)
首先要明确的是MonoBehaviour是每个脚本的基类.每个Javascript脚本自动继承MonoBehaviour.使用C#或Boo时,需要显式继承MonoBehaviour. ...
- 更改win10和mint双系统默认启动顺序
更改win7 & Linuxmint双系统安装后更改默认启动顺序 1.打开一个term,编辑/etc/default/grub,即sudo nano /etc/default/grub,把se ...
- struts2配置文件加载顺序
struts2配置文件加载顺序: struts-default.xml/ struts-plugin.xml/ struts.xml/ struts.properties/ web.xml
随机推荐
- 【ZZ】 DShader之位移贴图(Displacement Mapping)
http://www.myexception.cn/other/1397638.html DShader之位移贴图(Displacement Mapping) www.MyException.Cn ...
- slf4j提示Class path contains multiple SLF4J bindings
报错: SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding .jar!/org/slf4j/impl/St ...
- PHP防止用户重复提交表单
我们提交表单的时候,不能忽视的一个限制是防止用户重复提交表单,因为有可能用户连续点击了提交按钮或者是攻击者恶意提交数据,那么我们在提交数据后的处理如修改或添加数据到数据库时就会惹上麻烦. 那么如何规避 ...
- 20145235 《Java程序设计》第一次实验报告
实验一Java开发环境的熟悉 实验内容 1.使用JDK编译.运行简单的Java程序: 2.使用Eclipse 编辑.编译.运行.调试Java程序. 实验知识点 1.JVM.JRE.JDK的安装位置与区 ...
- LR网页细分图中的时间详解
Web Page Diagnostics: 1)DNS Resolution:浏览器访问一个网站的时候,一般用的是域名,需要dns服务器把这个域名解析为IP,这个过程就是域名解析时间,如果我们在局域网 ...
- 大话数据结构(十)java程序——队列
1.队列的定义 队列(queue):是只允许在一端进行插入操作,而在另一端进行删除操作的线性表. 队列是一种先进先出的线性表,简称FIFO(First out firts in).允许插入的一头是队尾 ...
- javascript的alert()的消息框不弹出或者弹出信息有误
有时不知道什么,有时javascript的alert()的消息框不弹出或者弹出信息有误,代码是这么写的: //提示信息 public static void alert(TemplateControl ...
- 【转】android程序编译过程
现在很多人想对Android工程的编译和打包进行自动化,比如建立每日构建系统.自动生成发布文件等等.这些都需要我们对Android工程的编译和打包有一个深入的理解,至少要知道它的每一步都做了什么,需要 ...
- Angular自动双向绑定值
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> ...
- 采用CSS3设计的登陆界面
body部分内容: <body> <form id="form_id" name="form_id" method="get&quo ...