ch.qos.logback.core.status.WarnStatus Java Examples
The following examples show how to use
ch.qos.logback.core.status.WarnStatus.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: KonkerContextInitializer.java From konker-platform with Apache License 2.0 | 6 votes |
private void multiplicityWarning(String resourceName, ClassLoader classLoader) { Set urlSet = null; StatusManager sm = this.loggerContext.getStatusManager(); try { urlSet = Loader.getResourceOccurrenceCount(resourceName, classLoader); } catch (IOException var7) { sm.add(new ErrorStatus("Failed to get url list for resource [" + resourceName + ']', this.loggerContext, var7)); } if (urlSet != null && urlSet.size() > 1) { sm.add(new WarnStatus("Resource [" + resourceName + "] occurs multiple times on the classpath.", this.loggerContext)); Iterator i$ = urlSet.iterator(); while (i$.hasNext()) { URL url = (URL) i$.next(); sm.add(new WarnStatus("Resource [" + resourceName + "] occurs at [" + url + ']', this.loggerContext)); } } }
Example #2
Source File: ContextInitializer.java From stategen with GNU Affero General Public License v3.0 | 5 votes |
private void multiplicityWarning(String resourceName, ClassLoader classLoader) { Set<URL> urlSet = null; StatusManager sm = loggerContext.getStatusManager(); try { urlSet = Loader.getResources(resourceName, classLoader); } catch (IOException e) { sm.add(new ErrorStatus("Failed to get url list for resource [" + resourceName + "]", loggerContext, e)); } if (urlSet != null && urlSet.size() > 1) { sm.add(new WarnStatus("Resource [" + resourceName + "] occurs multiple times on the classpath.", loggerContext)); for (URL url : urlSet) { sm.add(new WarnStatus("Resource [" + resourceName + "] occurs at [" + url.toString() + "]", loggerContext)); } } }
Example #3
Source File: KonkerLoggerContext.java From konker-platform with Apache License 2.0 | 4 votes |
final void noAppenderDefinedWarning(KonkerLogger logger) { if(this.noAppenderWarning++ == 0) { this.getStatusManager().add(new WarnStatus("No appenders present in context [" + this.getName() + "] for logger [" + logger.getName() + "].", logger)); } }