| File was renamed from opendj-slf4j-adapter/src/main/java/org/slf4j/impl/OpenDJLoggerAdapter.java |
| | |
| | | * |
| | | * Copyright 2014 ForgeRock AS. |
| | | */ |
| | | package org.slf4j.impl; |
| | | package org.opends.server.loggers; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.slf4j.LocalizedMarker; |
| | | import org.opends.messages.Severity; |
| | | import org.opends.server.loggers.ErrorLogger; |
| | | import org.opends.server.loggers.debug.DebugLogger; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.Marker; |
| | | |
| | |
| | | * The name of logger. |
| | | */ |
| | | public OpenDJLoggerAdapter(final String name) { |
| | | this.name = name; |
| | | // Tracer always use the provided name |
| | | // which should be a classname |
| | | this.tracer = DebugLogger.getTracer(name); |
| | | // Name is simplified if possible |
| | | this.name = LoggingCategoryNames.getCategoryName(name); |
| | | } |
| | | |
| | | /** {@inheritDoc} */ |
| | |
| | | |
| | | /** Trace with message only. */ |
| | | private void logTraceMessage(String msg) { |
| | | tracer.debugMessage(DebugLogLevel.VERBOSE, msg); |
| | | tracer.trace(msg); |
| | | |
| | | } |
| | | |
| | | /** Trace with message and exception. */ |
| | | private void logTraceException(@SuppressWarnings("unused") String message, Throwable t) { |
| | | tracer.debugCaught(DebugLogLevel.VERBOSE, t); |
| | | private void logTraceException(String message, Throwable t) { |
| | | tracer.traceException(message, t); |
| | | } |
| | | |
| | | /** |