Example usage for org.apache.commons.logging LogLevel equals

List of usage examples for org.apache.commons.logging LogLevel equals

Introduction

In this page you can find the example usage for org.apache.commons.logging LogLevel equals.

Prototype

public boolean equals(Object obj) 

Source Link

Document

Indicates whether some other object is "equal to" this one.

Usage

From source file:com.joliciel.talismane.utils.DaoUtils.java

public static void LogParameters(Map<String, Object> paramMap, LogLevel logLevel) {
    if (logLevel.equals(LogLevel.TRACE)) {
        if (LOG.isTraceEnabled()) {
            for (Object obj : paramMap.entrySet()) {
                @SuppressWarnings("rawtypes")
                Entry entry = (Entry) obj;
                LOG.trace(entry.getKey() + ": "
                        + (entry.getValue() == null ? "null" : entry.getValue().toString()));
            }/*from  w w w  .ja  v a 2 s . c o  m*/
        }
    } else if (logLevel.equals(LogLevel.DEBUG)) {
        if (LOG.isDebugEnabled()) {
            for (Object obj : paramMap.entrySet()) {
                @SuppressWarnings("rawtypes")
                Entry entry = (Entry) obj;
                LOG.debug(entry.getKey() + ": "
                        + (entry.getValue() == null ? "null" : entry.getValue().toString()));
            }
        }
    } else if (logLevel.equals(LogLevel.INFO)) {
        if (LOG.isInfoEnabled()) {
            for (Object obj : paramMap.entrySet()) {
                @SuppressWarnings("rawtypes")
                Entry entry = (Entry) obj;
                LOG.info(entry.getKey() + ": "
                        + (entry.getValue() == null ? "null" : entry.getValue().toString()));
            }
        }
    }
}