本文整理汇总了Java中org.springframework.util.Log4jConfigurer.shutdownLogging方法的典型用法代码示例。如果您正苦于以下问题:Java Log4jConfigurer.shutdownLogging方法的具体用法?Java Log4jConfigurer.shutdownLogging怎么用?Java Log4jConfigurer.shutdownLogging使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.springframework.util.Log4jConfigurer
的用法示例。
在下文中一共展示了Log4jConfigurer.shutdownLogging方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: shutdownLogging
import org.springframework.util.Log4jConfigurer; //导入方法依赖的package包/类
/**
* Shut down log4j, properly releasing all file locks
* and resetting the web app root system property.
* @param servletContext the current ServletContext
* @see WebUtils#removeWebAppRootSystemProperty
*/
public static void shutdownLogging(ServletContext servletContext) {
servletContext.log("Shutting down log4j");
try {
Log4jConfigurer.shutdownLogging();
}
finally {
// Remove the web app root system property.
if (exposeWebAppRoot(servletContext)) {
WebUtils.removeWebAppRootSystemProperty(servletContext);
}
}
}
示例2: contextDestroyed
import org.springframework.util.Log4jConfigurer; //导入方法依赖的package包/类
@Override
public void contextDestroyed(ServletContextEvent sce) {
LOG.info("Shutting down Kuali Rice...");
if (context != null) {
context.close();
}
LOG.info("...completed shutdown of Kuali Rice.");
Log4jConfigurer.shutdownLogging();
}
示例3: contextDestroyed
import org.springframework.util.Log4jConfigurer; //导入方法依赖的package包/类
@Override
public void contextDestroyed(ServletContextEvent sce) {
LOG.info("Shutting down Kuali Rice...");
if (context != null) {
context.close();
}
LOG.info("...completed shutdown of Kuali Rice.");
Log4jConfigurer.shutdownLogging();
}
示例4: destroy
import org.springframework.util.Log4jConfigurer; //导入方法依赖的package包/类
public void destroy() {
Log4jConfigurer.shutdownLogging();
}
示例5: shutdownLogging
import org.springframework.util.Log4jConfigurer; //导入方法依赖的package包/类
/**
* Shut down log4j, properly releasing all file locks and resetting the web
* app root system property.
*
* @param servletContext
* the current ServletContext
* @see WebUtils#removeWebAppRootSystemProperty
*/
public static void shutdownLogging(ServletContext servletContext) {
servletContext.log("Shutting down log4j");
Log4jConfigurer.shutdownLogging();
}