当前位置: 首页>>代码示例>>Java>>正文


Java Log类代码示例

本文整理汇总了Java中org.apache.juli.logging.Log的典型用法代码示例。如果您正苦于以下问题:Java Log类的具体用法?Java Log怎么用?Java Log使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Log类属于org.apache.juli.logging包,在下文中一共展示了Log类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: UserDataHelper

import org.apache.juli.logging.Log; //导入依赖的package包/类
public UserDataHelper(Log log) {
	this.log = log;

	Config tempConfig;
	String configString = System.getProperty("org.apache.juli.logging.UserDataHelper.CONFIG");
	if (configString == null) {
		tempConfig = Config.INFO_THEN_DEBUG;
	} else {
		try {
			tempConfig = Config.valueOf(configString);
		} catch (IllegalArgumentException iae) {
			// Ignore - use default
			tempConfig = Config.INFO_THEN_DEBUG;
		}
	}

	// Default suppression time of 1 day.
	suppressionTime = Integer.getInteger("org.apache.juli.logging.UserDataHelper.SUPPRESSION_TIME", 60 * 60 * 24)
			.intValue() * 1000L;

	if (suppressionTime == 0) {
		tempConfig = Config.INFO_ALL;
	}

	config = tempConfig;
}
 
开发者ID:how2j,项目名称:lazycat,代码行数:27,代码来源:UserDataHelper.java

示例2: DefaultInstanceManager

import org.apache.juli.logging.Log; //导入依赖的package包/类
public DefaultInstanceManager(Context context, Map<String, Map<String, String>> injectionMap, org.apache.catalina.Context catalinaContext, ClassLoader containerClassLoader) {
    classLoader = catalinaContext.getLoader().getClassLoader();
    privileged = catalinaContext.getPrivileged();
    this.containerClassLoader = containerClassLoader;
    ignoreAnnotations = catalinaContext.getIgnoreAnnotations();
    Log log = catalinaContext.getLogger();
    Set<String> classNames = new HashSet<String>();
    loadProperties(classNames,
            "org/apache/catalina/core/RestrictedServlets.properties",
            "defaultInstanceManager.restrictedServletsResource", log);
    loadProperties(classNames,
            "org/apache/catalina/core/RestrictedListeners.properties",
            "defaultInstanceManager.restrictedListenersResource", log);
    loadProperties(classNames,
            "org/apache/catalina/core/RestrictedFilters.properties",
            "defaultInstanceManager.restrictedFiltersResource", log);
    restrictedClasses = Collections.unmodifiableSet(classNames);
    this.context = context;
    this.injectionMap = injectionMap;
    this.postConstructMethods = catalinaContext.findPostConstructMethods();
    this.preDestroyMethods = catalinaContext.findPreDestroyMethods();
}
 
开发者ID:sunmingshuai,项目名称:apache-tomcat-7.0.73-with-comment,代码行数:23,代码来源:DefaultInstanceManager.java

示例3: getLog

import org.apache.juli.logging.Log; //导入依赖的package包/类
public static Log getLog(Class<?> clazz) {
	if (null != slf4jLoggerFactory) {
		try {
			Object slf4jLogger = slf4jLoggerFactory.getMethod("getLogger", Class.class).invoke(null, clazz);
			return getSlf4jWrapper(clazz, slf4jLogger);
		} catch (Exception e) {
			LogFactory.getLog(Utils.class).error("error while retrieving slf4j logger", e);
		}
	}
	return LogFactory.getLog(clazz);
}
 
开发者ID:appNG,项目名称:appng-tomcat-session,代码行数:12,代码来源:Utils.java

示例4: getLogger

import org.apache.juli.logging.Log; //导入依赖的package包/类
/**
 * Return the Logger for this Container.
 */
@Override
public Log getLogger() {

    if (logger != null)
        return (logger);
    logger = LogFactory.getLog(logName());
    return (logger);

}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:13,代码来源:ContainerBase.java

示例5: UserDataHelper

import org.apache.juli.logging.Log; //导入依赖的package包/类
public UserDataHelper(Log log) {
    this.log = log;

    Config tempConfig;
    String configString = System.getProperty(
            "org.apache.juli.logging.UserDataHelper.CONFIG");
    if (configString == null) {
        tempConfig = Config.INFO_THEN_DEBUG;
    } else {
        try {
            tempConfig = Config.valueOf(configString);
        } catch (IllegalArgumentException iae) {
            // Ignore - use default
            tempConfig = Config.INFO_THEN_DEBUG;
        }
    }

    // Default suppression time of 1 day.
    suppressionTime = Integer.getInteger(
            "org.apache.juli.logging.UserDataHelper.SUPPRESSION_TIME",
            60 * 60 * 24).intValue() * 1000L;

    if (suppressionTime == 0) {
        tempConfig = Config.INFO_ALL;
    }

    config = tempConfig;
}
 
开发者ID:sunmingshuai,项目名称:apache-tomcat-7.0.73-with-comment,代码行数:29,代码来源:UserDataHelper.java

示例6: CustomObjectInputStream

import org.apache.juli.logging.Log; //导入依赖的package包/类
/**
 * Construct a new instance of CustomObjectInputStream with filtering of
 * deserialized classes.
 *
 * @param stream
 *            The input stream we will read from
 * @param classLoader
 *            The class loader used to instantiate objects
 * @param log
 *            The logger to use to report any issues. It may only be null if
 *            the filterMode does not require logging
 * @param allowedClassNamePattern
 *            The regular expression to use to filter deserialized classes.
 *            The fully qualified class name must match this pattern for
 *            deserialization to be allowed if filtering is enabled.
 * @param warnOnFailure
 *            Should any failures be logged?
 *
 * @exception IOException
 *                if an input/output error occurs
 */
public CustomObjectInputStream(InputStream stream, ClassLoader classLoader, Log log,
		Pattern allowedClassNamePattern, boolean warnOnFailure) throws IOException {
	super(stream);
	if (log == null && allowedClassNamePattern != null && warnOnFailure) {
		throw new IllegalArgumentException(sm.getString("customObjectInputStream.logRequired"));
	}
	this.classLoader = classLoader;
	this.log = log;
	this.allowedClassNamePattern = allowedClassNamePattern;
	if (allowedClassNamePattern == null) {
		this.allowedClassNameFilter = null;
	} else {
		this.allowedClassNameFilter = allowedClassNamePattern.toString();
	}
	this.warnOnFailure = warnOnFailure;

	Set<String> reportedClasses;
	synchronized (reportedClassCache) {
		reportedClasses = reportedClassCache.get(classLoader);
		if (reportedClasses == null) {
			reportedClasses = Collections.newSetFromMap(new ConcurrentHashMap<String, Boolean>());
			reportedClassCache.put(classLoader, reportedClasses);
		}
	}
	this.reportedClasses = reportedClasses;
}
 
开发者ID:how2j,项目名称:lazycat,代码行数:48,代码来源:CustomObjectInputStream.java

示例7: getLogger

import org.apache.juli.logging.Log; //导入依赖的package包/类
/**
 * Return the Logger for this Container.
 */
@Override
public Log getLogger() {

	if (logger != null)
		return (logger);
	logger = LogFactory.getLog(logName());
	return (logger);

}
 
开发者ID:how2j,项目名称:lazycat,代码行数:13,代码来源:ContainerBase.java

示例8: getLogger

import org.apache.juli.logging.Log; //导入依赖的package包/类
@Override
protected Log getLogger() {
	return log;
}
 
开发者ID:how2j,项目名称:lazycat,代码行数:5,代码来源:RemoteAddrFilter.java

示例9: getLogger

import org.apache.juli.logging.Log; //导入依赖的package包/类
@Override
public Log getLogger() {
    return log;
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:5,代码来源:SimpleTcpCluster.java

示例10: getLogger

import org.apache.juli.logging.Log; //导入依赖的package包/类
@Override
public Log getLogger() { return null; }
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:3,代码来源:FailedContext.java

示例11: getLog

import org.apache.juli.logging.Log; //导入依赖的package包/类
@Override
protected Log getLog() {
    return log;
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:5,代码来源:RemoteHostValve.java

示例12: getLog

import org.apache.juli.logging.Log; //导入依赖的package包/类
@Override
protected Log getLog() {
	return log;
}
 
开发者ID:how2j,项目名称:lazycat,代码行数:5,代码来源:AjpProcessor.java

示例13: getLogger

import org.apache.juli.logging.Log; //导入依赖的package包/类
@Override
protected Log getLogger() {
    return log;
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:5,代码来源:SetCharacterEncodingFilter.java

示例14: getLogger

import org.apache.juli.logging.Log; //导入依赖的package包/类
@Override
public Log getLogger() {
	return null;
}
 
开发者ID:how2j,项目名称:lazycat,代码行数:5,代码来源:FailedContext.java

示例15: getLog

import org.apache.juli.logging.Log; //导入依赖的package包/类
@Override
protected Log getLog() {return log;}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:3,代码来源:NioProcessor.java


注:本文中的org.apache.juli.logging.Log类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。