本文整理匯總了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;}