List of usage examples for java.util.logging Level equals
@Override public boolean equals(Object ox)
From source file:it.unibo.alchemist.utils.L.java
private static void log(final Level level, final String message) { LOGGER.log(level, message);//from w w w . j a va 2s . com flush(); if (gui && level.equals(Level.SEVERE)) { SwingUtilities.invokeLater(new Runnable() { @Override public void run() { JOptionPane.showMessageDialog(null, message, "Error", JOptionPane.ERROR_MESSAGE); } }); } }
From source file:org.jomc.logging.ri.commons.CommonsLogger.java
public void onLog(final Level level, final String message, final Throwable throwable) { if (level != null) { if (level.equals(Level.CONFIG) || level.equals(Level.FINE)) { this.getObjectManagementLogger().debug(message, throwable); } else if (level.equals(Level.FINER) || level.equals(Level.FINEST)) { this.getObjectManagementLogger().trace(message, throwable); } else if (level.equals(Level.INFO)) { this.getObjectManagementLogger().info(message, throwable); } else if (level.equals(Level.SEVERE)) { this.getObjectManagementLogger().error(message, throwable); } else if (level.equals(Level.WARNING)) { this.getObjectManagementLogger().warn(message, throwable); } else {/*from w ww .j ava2 s.c om*/ this.getObjectManagementLogger().trace(message, throwable); } } }
From source file:org.jretty.log.Jdk14Logger.java
@Override public void log(String callerFQCN, org.jretty.log.Level level, Throwable t, Object message, Object... msgParams) {/*from w w w .j a va2 s. com*/ Level julLevel; if (level == null) { julLevel = getLevel(); } else if (level.equals(org.jretty.log.Level.FATAL) || level.equals(org.jretty.log.Level.ERROR)) { julLevel = Level.SEVERE; } else if (level.equals(org.jretty.log.Level.WARN)) { julLevel = Level.WARNING; } else if (level.equals(org.jretty.log.Level.INFO)) { julLevel = Level.INFO; } else if (level.equals(org.jretty.log.Level.DEBUG)) { julLevel = Level.FINE; } else if (level.equals(org.jretty.log.Level.TRACE)) { julLevel = Level.FINEST; } else if (level.equals(org.jretty.log.Level.ALL)) { julLevel = Level.ALL; } else if (level.equals(org.jretty.log.Level.OFF)) { julLevel = Level.OFF; } else { throw new IllegalStateException("Level " + level + " is not recognized."); } if (log.isLoggable(julLevel)) { log(callerFQCN, julLevel, LogUtils.replace(message.toString(), msgParams), t); } }