本文整理汇总了Java中org.sonar.api.utils.log.Loggers类的典型用法代码示例。如果您正苦于以下问题:Java Loggers类的具体用法?Java Loggers怎么用?Java Loggers使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Loggers类属于org.sonar.api.utils.log包,在下文中一共展示了Loggers类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: unload
import org.sonar.api.utils.log.Loggers; //导入依赖的package包/类
public void unload(Collection<Plugin> plugins) {
for (Plugin plugin : plugins) {
ClassLoader classLoader = plugin.getClass().getClassLoader();
if (classLoader instanceof Closeable && classLoader != classloaderFactory.baseClassLoader()) {
try {
((Closeable) classLoader).close();
} catch (Exception e) {
Loggers.get(getClass()).error("Fail to close classloader " + classLoader.toString(), e);
}
}
}
}
示例2: setBasePlugin
import org.sonar.api.utils.log.Loggers; //导入依赖的package包/类
public PluginInfo setBasePlugin(@Nullable String s) {
if ("l10nen".equals(s)) {
Loggers.get(PluginInfo.class).info("Plugin [{}] defines 'l10nen' as base plugin. " +
"This metadata can be removed from manifest of l10n plugins since version 5.2.", key);
basePlugin = null;
} else {
basePlugin = s;
}
return this;
}
示例3: createPicoContainer
import org.sonar.api.utils.log.Loggers; //导入依赖的package包/类
public static MutablePicoContainer createPicoContainer() {
ReflectionLifecycleStrategy lifecycleStrategy = new ReflectionLifecycleStrategy(new NullComponentMonitor(), "start", "stop", "close") {
@Override
public void start(Object component) {
Profiler profiler = Profiler.createIfTrace(Loggers.get(ComponentContainer.class));
profiler.start();
super.start(component);
profiler.stopTrace(component.getClass().getCanonicalName() + " started");
}
};
return new ExtendedDefaultPicoContainer(new OptInCaching(), lifecycleStrategy, null);
}
示例4: WaffleSettings
import org.sonar.api.utils.log.Loggers; //导入依赖的package包/类
public WaffleSettings(String filterName, ServletContext servletContext, WindowsAuthSettings windowsAuthSettings) {
this.filterName = filterName;
this.servletContext = servletContext;
initParams = new HashMap<>();
// allowGuestLogin is enabled by default. Explicitly disabling the guest login.
initParams.put(ALLOW_GUEST_LOGIN, ALLOW_GUEST_LOGIN_VALUE);
initParams.put(SECURITY_FILTER_PROVIDERS, SECURITY_FILTER_PROVIDERS_VALUE);
initParams.put(NEGOTIATE_SECURITY_FILTER_PROVIDER_PROTOCOLS, windowsAuthSettings.getProtocols());
Loggers.get(getClass()).debug("Waffle initialization parameters : {}", initParams);
}