當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。