本文整理了Java中org.apache.catalina.startup.Tomcat.getLoggerName()
方法的一些代码示例,展示了Tomcat.getLoggerName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Tomcat.getLoggerName()
方法的具体详情如下:
包路径:org.apache.catalina.startup.Tomcat
类名称:Tomcat
方法名:getLoggerName
暂无
代码示例来源:origin: codefollower/Tomcat-Research
private void silence(Host host, String ctx) {
Logger.getLogger(getLoggerName(host, ctx)).setLevel(Level.WARNING);
}
代码示例来源:origin: org.apache.tomcat/tomcat-catalina
private void silence(Host host, String contextPath) {
String loggerName = getLoggerName(host, contextPath);
Logger logger = Logger.getLogger(loggerName);
pinnedLoggers.put(loggerName, logger);
if (silent) {
logger.setLevel(Level.WARNING);
} else {
logger.setLevel(Level.INFO);
}
}
代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core
private void silence(Host host, String contextPath) {
String loggerName = getLoggerName(host, contextPath);
Logger logger = Logger.getLogger(loggerName);
pinnedLoggers.put(loggerName, logger);
if (silent) {
logger.setLevel(Level.WARNING);
} else {
logger.setLevel(Level.INFO);
}
}
代码示例来源:origin: codefollower/Tomcat-Research
private URL getWebappConfigFileFromDirectory(File docBase, String url) {
URL result = null;
File webAppContextXml = new File(docBase, Constants.ApplicationContextXml);
if (webAppContextXml.exists()) {
try {
result = webAppContextXml.toURI().toURL();
} catch (MalformedURLException e) {
Logger.getLogger(getLoggerName(getHost(), url)).log(Level.WARNING,
"Unable to determine web application context.xml " + docBase, e);
}
}
return result;
}
代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core
private URL getWebappConfigFileFromDirectory(File docBase, String contextName) {
URL result = null;
File webAppContextXml = new File(docBase, Constants.ApplicationContextXml);
if (webAppContextXml.exists()) {
try {
result = webAppContextXml.toURI().toURL();
} catch (MalformedURLException e) {
Logger.getLogger(getLoggerName(getHost(), contextName)).log(Level.WARNING,
"Unable to determine web application context.xml " + docBase, e);
}
}
return result;
}
代码示例来源:origin: org.apache.tomcat/tomcat-catalina
private URL getWebappConfigFileFromDirectory(File docBase, String contextName) {
URL result = null;
File webAppContextXml = new File(docBase, Constants.ApplicationContextXml);
if (webAppContextXml.exists()) {
try {
result = webAppContextXml.toURI().toURL();
} catch (MalformedURLException e) {
Logger.getLogger(getLoggerName(getHost(), contextName)).log(Level.WARNING,
sm.getString("tomcat.noContextXml", docBase), e);
}
}
return result;
}
代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core
private URL getWebappConfigFileFromJar(File docBase, String contextName) {
URL result = null;
try (JarFile jar = new JarFile(docBase)) {
JarEntry entry = jar.getJarEntry(Constants.ApplicationContextXml);
if (entry != null) {
result = UriUtil.buildJarUrl(docBase, Constants.ApplicationContextXml);
}
} catch (IOException e) {
Logger.getLogger(getLoggerName(getHost(), contextName)).log(Level.WARNING,
"Unable to determine web application context.xml " + docBase, e);
}
return result;
}
}
代码示例来源:origin: codefollower/Tomcat-Research
private URL getWebappConfigFileFromJar(File docBase, String url) {
URL result = null;
JarFile jar = null;
try {
jar = new JarFile(docBase);
JarEntry entry = jar.getJarEntry(Constants.ApplicationContextXml);
if (entry != null) {
result = new URL("jar:" + docBase.toURI().toString() + "!/"
+ Constants.ApplicationContextXml);
}
} catch (IOException e) {
Logger.getLogger(getLoggerName(getHost(), url)).log(Level.WARNING,
"Unable to determine web application context.xml " + docBase, e);
} finally {
if (jar != null) {
try {
jar.close();
} catch (IOException e) {
// ignore
}
}
}
return result;
}
}
代码示例来源:origin: org.apache.tomcat/tomcat-catalina
private URL getWebappConfigFileFromWar(File docBase, String contextName) {
URL result = null;
try (JarFile jar = new JarFile(docBase)) {
JarEntry entry = jar.getJarEntry(Constants.ApplicationContextXml);
if (entry != null) {
result = UriUtil.buildJarUrl(docBase, Constants.ApplicationContextXml);
}
} catch (IOException e) {
Logger.getLogger(getLoggerName(getHost(), contextName)).log(Level.WARNING,
sm.getString("tomcat.noContextXml", docBase), e);
}
return result;
}
内容来源于网络,如有侵权,请联系作者删除!