本文整理汇总了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;
}
示例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();
}
示例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);
}
示例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);
}
示例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;
}
示例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;
}
示例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);
}
示例8: getLogger
import org.apache.juli.logging.Log; //导入依赖的package包/类
@Override
protected Log getLogger() {
return log;
}
示例9: getLogger
import org.apache.juli.logging.Log; //导入依赖的package包/类
@Override
public Log getLogger() {
return log;
}
示例10: getLogger
import org.apache.juli.logging.Log; //导入依赖的package包/类
@Override
public Log getLogger() { return null; }
示例11: getLog
import org.apache.juli.logging.Log; //导入依赖的package包/类
@Override
protected Log getLog() {
return log;
}
示例12: getLog
import org.apache.juli.logging.Log; //导入依赖的package包/类
@Override
protected Log getLog() {
return log;
}
示例13: getLogger
import org.apache.juli.logging.Log; //导入依赖的package包/类
@Override
protected Log getLogger() {
return log;
}
示例14: getLogger
import org.apache.juli.logging.Log; //导入依赖的package包/类
@Override
public Log getLogger() {
return null;
}
示例15: getLog
import org.apache.juli.logging.Log; //导入依赖的package包/类
@Override
protected Log getLog() {return log;}