org.apache.commons.logging.LogFactory.getConfigurationFile()方法的使用及代码示例

x33g5p2x  于2022-01-23 转载在 其他  
字(2.8k)|赞(0)|评价(0)|浏览(164)

本文整理了Java中org.apache.commons.logging.LogFactory.getConfigurationFile()方法的一些代码示例,展示了LogFactory.getConfigurationFile()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。LogFactory.getConfigurationFile()方法的具体详情如下:
包路径:org.apache.commons.logging.LogFactory
类名称:LogFactory
方法名:getConfigurationFile

LogFactory.getConfigurationFile介绍

[英]Locate a user-provided configuration file.

The classpath of the specified classLoader (usually the context classloader) is searched for properties files of the specified name. If none is found, null is returned. If more than one is found, then the file with the greatest value for its PRIORITY property is returned. If multiple files have the same PRIORITY value then the first in the classpath is returned.

This differs from the 1.0.x releases; those always use the first one found. However as the priority is a new field, this change is backwards compatible.

The purpose of the priority field is to allow a webserver administrator to override logging settings in all webapps by placing a commons-logging.properties file in a shared classpath location with a priority > 0; this overrides any commons-logging.properties files without priorities which are in the webapps. Webapps can also use explicit priorities to override a configuration file in the shared classpath if needed.
[中]

代码示例

代码示例来源:origin: commons-logging/commons-logging

Properties props = getConfigurationFile(contextClassLoader, FACTORY_PROPERTIES);

代码示例来源:origin: robovm/robovm

Properties props = getConfigurationFile(contextClassLoader, FACTORY_PROPERTIES);

代码示例来源:origin: camunda/camunda-bpm-platform

Properties props = getConfigurationFile(contextClassLoader, FACTORY_PROPERTIES);

代码示例来源:origin: com.bugvm/bugvm-rt

Properties props = getConfigurationFile(contextClassLoader, FACTORY_PROPERTIES);

代码示例来源:origin: ibinti/bugvm

Properties props = getConfigurationFile(contextClassLoader, FACTORY_PROPERTIES);

代码示例来源:origin: MobiVM/robovm

Properties props = getConfigurationFile(contextClassLoader, FACTORY_PROPERTIES);

代码示例来源:origin: com.mobidevelop.robovm/robovm-rt

Properties props = getConfigurationFile(contextClassLoader, FACTORY_PROPERTIES);

代码示例来源:origin: apache-logging/commons-logging

Properties props = getConfigurationFile(contextClassLoader, FACTORY_PROPERTIES);

代码示例来源:origin: com.gluonhq/robovm-rt

Properties props = getConfigurationFile(contextClassLoader, FACTORY_PROPERTIES);

代码示例来源:origin: FlexoVM/flexovm

Properties props = getConfigurationFile(contextClassLoader, FACTORY_PROPERTIES);

代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded

Properties props = getConfigurationFile(contextClassLoader, FACTORY_PROPERTIES);

代码示例来源:origin: org.apache.openjpa/openjpa-all

Properties props = getConfigurationFile(contextClassLoader, FACTORY_PROPERTIES);

代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.apache.commons.logging

Properties props = getConfigurationFile(contextClassLoader, FACTORY_PROPERTIES);

代码示例来源:origin: Nextdoor/bender

Properties props = getConfigurationFile(contextClassLoader, FACTORY_PROPERTIES);

相关文章