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

x33g5p2x  于2022-01-24 转载在 其他  
字(9.7k)|赞(0)|评价(0)|浏览(169)

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

LogFactory.getFactory介绍

[英]Construct (if necessary) and return a LogFactory instance, using the following ordered lookup procedure to determine the name of the implementation class to be loaded.

  • The org.apache.commons.logging.LogFactory system property.
  • The JDK 1.3 Service Discovery mechanism
  • Use the properties file commons-logging.properties file, if found in the class path of this class. The configuration file is in standard java.util.Properties format and contains the fully qualified name of the implementation class with the key being the system property defined above.
  • Fall back to a default implementation class (org.apache.commons.logging.impl.LogFactoryImpl).

NOTE - If the properties file method of identifying the LogFactory implementation class is utilized, all of the properties defined in this file will be set as configuration attributes on the corresponding LogFactory instance.
[中]构造(如果需要)并返回LogFactory实例,使用以下有序查找过程确定要加载的实现类的名称。
*org.apache.commons.logging.LogFactory系统属性。
*JDK1.3服务发现机制
*如果在此类的类路径中找到,请使用属性文件commons-logging.properties文件。配置文件采用标准java.util.Properties格式,包含实现类的完全限定名,键为上面定义的系统属性。
*退回到默认的实现类(org.apache.commons.logging.impl.LogFactoryImpl)。
注意-如果使用标识LogFactory实现类的属性文件方法,则此文件中定义的所有属性都将设置为相应LogFactory实例上的配置属性。

代码示例

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

/**
 * Convenience method to return a named logger, without the application
 * having to care about factories.
 *
 * @param clazz Class from which a log name will be derived
 *
 * @exception LogConfigurationException if a suitable <code>Log</code>
 *  instance cannot be returned
 */
public static Log getLog(Class<?> clazz)
  throws LogConfigurationException {
  return (getFactory().getInstance(clazz));
}

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

/**
 * Convenience method to return a named logger, without the application
 * having to care about factories.
 *
 * @param name Logical name of the <code>Log</code> instance to be
 *  returned (the meaning of this name is only known to the underlying
 *  logging implementation that is being wrapped)
 *
 * @exception LogConfigurationException if a suitable <code>Log</code>
 *  instance cannot be returned
 */
public static Log getLog(String name)
  throws LogConfigurationException {
  return (getFactory().getInstance(name));
}

代码示例来源:origin: codefollower/Tomcat-Research

/**
 * Convenience method to return a named logger, without the application
 * having to care about factories.
 *
 * @param clazz Class from which a log name will be derived
 *
 * @exception LogConfigurationException if a suitable <code>Log</code>
 *  instance cannot be returned
 */
public static Log getLog(Class<?> clazz)
  throws LogConfigurationException {
  return (getFactory().getInstance(clazz));
}

代码示例来源:origin: org.apache.openejb/tomee-juli

public static Log getLog(final String name)
  throws LogConfigurationException {
  return getFactory().getInstance(name);
}

代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9

/**
 * Convenience method to return a named logger, without the application
 * having to care about factories.
 *
 * @param clazz Class from which a log name will be derived
 *
 * @exception LogConfigurationException if a suitable <code>Log</code>
 *  instance cannot be returned
 */
public static Log getLog(Class<?> clazz)
  throws LogConfigurationException {
  return (getFactory().getInstance(clazz));
}

代码示例来源:origin: org.apache.juli/com.springsource.org.apache.juli.extras

/**
 * Convenience method to return a named logger, without the application
 * having to care about factories.
 *
 * @param clazz Class from which a log name will be derived
 *
 * @exception LogConfigurationException if a suitable <code>Log</code>
 *  instance cannot be returned
 */
public static Log getLog(Class<?> clazz)
  throws LogConfigurationException {
  return (getFactory().getInstance(clazz));
}

代码示例来源:origin: tomcat-slf4j-logback/tomcat-slf4j-logback

/**
 * Convenience method to return a named logger, without the application having
 * to care about factories.
 * 
 * @param clazz
 *                Class from which a log name will be derived
 * 
 * @exception LogConfigurationException
 *                    if a suitable <code>Log</code> instance cannot be
 *                    returned
 */
public static Log getLog(Class clazz) throws LogConfigurationException {
  return (getFactory().getInstance(clazz));
}

代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9

/**
 * Convenience method to return a named logger, without the application
 * having to care about factories.
 *
 * @param clazz Class from which a log name will be derived
 *
 * @exception LogConfigurationException if a suitable <code>Log</code>
 *  instance cannot be returned
 */
public static Log getLog(Class<?> clazz)
  throws LogConfigurationException {
  return (getFactory().getInstance(clazz));
}

代码示例来源:origin: org.apache.geronimo.ext.tomcat/juli

/**
 * Convenience method to return a named logger, without the application
 * having to care about factories.
 *
 * @param clazz Class from which a log name will be derived
 *
 * @exception LogConfigurationException if a suitable <code>Log</code>
 *  instance cannot be returned
 */
public static Log getLog(Class<?> clazz)
  throws LogConfigurationException {
  return (getFactory().getInstance(clazz));
}

代码示例来源:origin: org.apache.openejb/tomee-juli

public static Log getLog(final Class<?> clazz)
  throws LogConfigurationException {
  return getFactory().getInstance(clazz);
}

代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7

/**
 * Convenience method to return a named logger, without the application
 * having to care about factories.
 *
 * @param clazz Class from which a log name will be derived
 *
 * @exception LogConfigurationException if a suitable <code>Log</code>
 *  instance cannot be returned
 */
public static Log getLog(Class<?> clazz)
  throws LogConfigurationException {
  return (getFactory().getInstance(clazz));
}

代码示例来源:origin: ops4j/org.ops4j.pax.logging

/**
 * Convenience method to return a named logger, without the application
 * having to care about factories.
 *
 * @param clazz Class from which a log name will be derived
 *
 * @exception LogConfigurationException if a suitable <code>Log</code>
 *  instance cannot be returned
 */
public static Log getLog(Class clazz)
  throws LogConfigurationException {
  return (getFactory().getInstance(clazz));
}

代码示例来源:origin: tomcat-slf4j-logback/tomcat-slf4j-logback

/**
 * Convenience method to return a named logger, without the application having
 * to care about factories.
 * 
 * @param clazz
 *                Class from which a log name will be derived
 * 
 * @exception LogConfigurationException
 *                    if a suitable <code>Log</code> instance cannot be
 *                    returned
 */
public static Log getLog(Class clazz) throws LogConfigurationException {
  return (getFactory().getInstance(clazz));
}

代码示例来源:origin: tomcat-slf4j-logback/tomcat-slf4j-logback

/**
 * Convenience method to return a named logger, without the application having
 * to care about factories.
 * 
 * @param clazz
 *                Class from which a log name will be derived
 * 
 * @exception LogConfigurationException
 *                    if a suitable <code>Log</code> instance cannot be
 *                    returned
 */
public static Log getLog(Class clazz) throws LogConfigurationException {
  return (getFactory().getInstance(clazz));
}

代码示例来源:origin: org.apache.tomcat/tomcat-juli

/**
 * Convenience method to return a named logger, without the application
 * having to care about factories.
 *
 * @param clazz Class from which a log name will be derived
 *
 * @return A log instance with a name of clazz.getName()
 *
 * @exception LogConfigurationException if a suitable <code>Log</code>
 *  instance cannot be returned
 */
public static Log getLog(Class<?> clazz)
  throws LogConfigurationException {
  return getFactory().getInstance(clazz);
}

代码示例来源:origin: codefollower/Tomcat-Research

/**
 * Convenience method to return a named logger, without the application
 * having to care about factories.
 *
 * @param name Logical name of the <code>Log</code> instance to be
 *  returned (the meaning of this name is only known to the underlying
 *  logging implementation that is being wrapped)
 *
 * @exception LogConfigurationException if a suitable <code>Log</code>
 *  instance cannot be returned
 */
public static Log getLog(String name)
  throws LogConfigurationException {
  return (getFactory().getInstance(name));
}

代码示例来源:origin: org.apache.geronimo.ext.tomcat/juli

/**
 * Convenience method to return a named logger, without the application
 * having to care about factories.
 *
 * @param name Logical name of the <code>Log</code> instance to be
 *  returned (the meaning of this name is only known to the underlying
 *  logging implementation that is being wrapped)
 *
 * @exception LogConfigurationException if a suitable <code>Log</code>
 *  instance cannot be returned
 */
public static Log getLog(String name)
  throws LogConfigurationException {
  return (getFactory().getInstance(name));
}

代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7

/**
 * Convenience method to return a named logger, without the application
 * having to care about factories.
 *
 * @param name Logical name of the <code>Log</code> instance to be
 *  returned (the meaning of this name is only known to the underlying
 *  logging implementation that is being wrapped)
 *
 * @exception LogConfigurationException if a suitable <code>Log</code>
 *  instance cannot be returned
 */
public static Log getLog(String name)
  throws LogConfigurationException {
  return (getFactory().getInstance(name));
}

代码示例来源:origin: org.apache.juli/com.springsource.org.apache.juli.extras

/**
 * Convenience method to return a named logger, without the application
 * having to care about factories.
 *
 * @param name Logical name of the <code>Log</code> instance to be
 *  returned (the meaning of this name is only known to the underlying
 *  logging implementation that is being wrapped)
 *
 * @exception LogConfigurationException if a suitable <code>Log</code>
 *  instance cannot be returned
 */
public static Log getLog(String name)
  throws LogConfigurationException {
  return (getFactory().getInstance(name));
}

代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9

/**
 * Convenience method to return a named logger, without the application
 * having to care about factories.
 *
 * @param name Logical name of the <code>Log</code> instance to be
 *  returned (the meaning of this name is only known to the underlying
 *  logging implementation that is being wrapped)
 *
 * @exception LogConfigurationException if a suitable <code>Log</code>
 *  instance cannot be returned
 */
public static Log getLog(String name)
  throws LogConfigurationException {
  return (getFactory().getInstance(name));
}

相关文章