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

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

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

LogFactory.getLog介绍

[英]Convenience method to return a named logger, without the application having to care about factories.
[中]返回命名记录器的便捷方法,应用程序无需关心工厂。

代码示例

代码示例来源:origin: apache/geode

@Override
public Log getLogger() {
 if (LOGGER == null) {
  LOGGER = LogFactory.getLog(DeltaSessionManager.class);
 }
 return LOGGER;
}

代码示例来源:origin: magro/memcached-session-manager

public static void initLogConfig(@SuppressWarnings("rawtypes") final Class<? extends TestUtils> clazz) {
  final URL loggingProperties = clazz.getResource("/logging.properties");
  try {
    System.setProperty("java.util.logging.config.file", new File(loggingProperties.toURI()).getAbsolutePath());
  } catch (final Exception e) {
    // we don't have a plain file (e.g. the case for msm-kryo-serializer etc), so we can skip reading the config
    return;
  }
  try {
    LogManager.getLogManager().readConfiguration();
  } catch (final Exception e) {
    LogFactory.getLog( TestUtils.class ).error("Could not init logging configuration.", e);
  }
}

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

private Log getLog() {
    if (log == null) {
      synchronized (this) {
        if (log == null) {
          log = LogFactory.getLog(LazyReplicatedMap.class);
        }
      }
    }
    return log;
  }
}

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

private Log getLog() {
    if (log == null) {
      synchronized (this) {
        if (log == null) {
          log = LogFactory.getLog(ReplicatedMap.class);
        }
      }
    }
    return log;
  }
}

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

private void readObject(ObjectInputStream ois) throws ClassNotFoundException, IOException {
    ois.defaultReadObject();
    log = LogFactory.getLog(RemoteIpFilter.class);
  }
}

代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core

private void readObject(ObjectInputStream ois) throws ClassNotFoundException, IOException {
    ois.defaultReadObject();
    log = LogFactory.getLog(RemoteIpFilter.class);
  }
}

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

private void readObject(ObjectInputStream ois) throws ClassNotFoundException, IOException {
  ois.defaultReadObject();
  log = LogFactory.getLog(ApplicationFilterConfig.class);
}

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

/**
 * Return the Logger for this Container.
 */
@Override
public Log getLogger() {
  if (logger != null)
    return logger;
  logger = LogFactory.getLog(getLogName());
  return logger;
}

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

/**
 * Return the Logger for this Container.
 */
@Override
public Log getLogger() {
  if (logger != null)
    return (logger);
  logger = LogFactory.getLog(logName());
  return (logger);
}

代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core

/**
 * Return the Logger for this Container.
 */
@Override
public Log getLogger() {
  if (logger != null)
    return logger;
  logger = LogFactory.getLog(getLogName());
  return logger;
}

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

/**
 * Return the Logger for this Container.
 */
@Override
public Log getLogger() {
  if (logger != null)
    return (logger);
  logger = LogFactory.getLog(logName());
  return (logger);
}

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

/**
 * Return the Logger for this Container.
 */
@Override
public Log getLogger() {
  if (logger != null)
    return (logger);
  logger = LogFactory.getLog(logName());
  return (logger);
}

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

/**
 * Return the Logger for this Container.
 */
@Override
public Log getLogger() {
  if (logger != null)
    return (logger);
  logger = LogFactory.getLog(logName());
  return (logger);
}

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

private static String locationFor(String name) {
  URL location = CLASS_SERVLET_CONTEXT.getResource("resources/" + name);
  if (location == null && CLASS_JSP_CONTEXT != null) {
    location = CLASS_JSP_CONTEXT.getResource("resources/" + name);
  }
  if (location == null) {
    Log log = LogFactory.getLog(DigesterFactory.class);
    log.warn(sm.getString("digesterFactory.missingSchema", name));
    return null;
  }
  return location.toExternalForm();
}

代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core

private static String locationFor(String name) {
  URL location = CLASS_SERVLET_CONTEXT.getResource("resources/" + name);
  if (location == null && CLASS_JSP_CONTEXT != null) {
    location = CLASS_JSP_CONTEXT.getResource("resources/" + name);
  }
  if (location == null) {
    Log log = LogFactory.getLog(DigesterFactory.class);
    log.warn(sm.getString("digesterFactory.missingSchema", name));
    return null;
  }
  return location.toExternalForm();
}

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

public void setConfiguration(String configuration)
  throws Exception {
  if (containerLog == null) {
    containerLog = LogFactory.getLog(getContainer().getLogName() + ".rewrite");
  }
  maps.clear();
  parse(new BufferedReader(new StringReader(configuration)));
}

代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core

public void setConfiguration(String configuration)
  throws Exception {
  if (containerLog == null) {
    containerLog = LogFactory.getLog(getContainer().getLogName() + ".rewrite");
  }
  maps.clear();
  parse(new BufferedReader(new StringReader(configuration)));
}

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

@Override
public void warning(SAXParseException ex) throws SAXException {
  Log log = LogFactory.getLog(MyErrorHandler.class);
  if (log.isDebugEnabled())
    log.debug("ParserUtils: warning ", ex);
  // We ignore warnings
}

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

@Override
public void warning(SAXParseException ex) throws SAXException {
  Log log = LogFactory.getLog(MyErrorHandler.class);
  if (log.isDebugEnabled())
    log.debug("ParserUtils: warning ", ex);
  // We ignore warnings
}

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

@Override
protected void initInternal() throws LifecycleException {
  super.initInternal();
  containerLog = LogFactory.getLog(getContainer().getLogName() + ".rewrite");
}

相关文章