OpenDJLoggerAdapter.java revision 09a696cadc620d9d18add4262c352831d7ba7043
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at legal-notices/CDDLv1_0.txt.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information:
* Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*
*
* Copyright 2014-2015 ForgeRock AS.
*/
/**
* OpenDJ implementation of a SLF4J Logger.
* <p>
* Log calls at trace level are redirected to {@code DebugLogger}, while calls
* at other levels are redirected to {@code ErrorLogger}.
* <p>
* Trace level calls are accepted with no Marker argument, while calls at other
* level must be done with a Marker expected to be an instance of
* {@code LocalizedMarker}.
*/
final class OpenDJLoggerAdapter implements Logger {
/** Name of logger, used as the category. */
/** The tracer associated to this logger. */
private final DebugTracer tracer;
/**
* Creates a new logger with the provided name.
*
* @param name
* The name of logger.
*/
// Tracer always use the provided name
// which should be a classname
// Name is simplified if possible
}
/** {@inheritDoc} */
return name;
}
/** Trace with message only. */
}
/** Trace with message and exception. */
}
/**
* Log a message to {@code ErrorLogger} with the provided severity,
* extracting {@code LocalizableMessage} from the provided
* {@code Marker marker} argument.
*
* @param marker
* The marker, expected to be an instance of
* {@code LocalizedMarker} class, from which message to log is
* extracted.
* @param severity
* The severity to use when logging message.
* @param throwable
* Exception to log. May be {@code null}.
*/
if (marker instanceof LocalizedMarker) {
} else {
throw new IllegalStateException("Expecting the marker to be an instance of LocalizedMarker");
}
}
/** {@inheritDoc} */
public boolean isTraceEnabled() {
}
/** {@inheritDoc} */
}
/** {@inheritDoc} */
}
/** {@inheritDoc} */
logTraceException(msg, t);
}
/** {@inheritDoc} */
logTraceException(msg, t);
}
/** {@inheritDoc} */
public boolean isDebugEnabled() {
}
/** {@inheritDoc} */
}
/** {@inheritDoc} */
}
/** {@inheritDoc} */
public boolean isInfoEnabled() {
}
/** {@inheritDoc} */
}
/** {@inheritDoc} */
}
/** {@inheritDoc} */
public boolean isWarnEnabled() {
}
/** {@inheritDoc} */
}
/** {@inheritDoc} */
}
/** {@inheritDoc} */
public boolean isErrorEnabled() {
}
/** {@inheritDoc} */
}
/** {@inheritDoc} */
}
/** {@inheritDoc} */
return isTraceEnabled();
}
/** {@inheritDoc} */
return isDebugEnabled();
}
/** {@inheritDoc} */
return isInfoEnabled();
}
/** {@inheritDoc} */
return isWarnEnabled();
}
/** {@inheritDoc} */
return isErrorEnabled();
}
/** {@inheritDoc} */
throw new UnsupportedOperationException("Use #trace(String) instead.");
}
/** {@inheritDoc} */
throw new UnsupportedOperationException("Use #trace(String) instead.");
}
/** {@inheritDoc} */
throw new UnsupportedOperationException("Use #trace(String) instead.");
}
/** {@inheritDoc} */
throw new UnsupportedOperationException("Use #trace(Marker, String) instead.");
}
/** {@inheritDoc} */
throw new UnsupportedOperationException("Use #trace(Marker, String) instead.");
}
/** {@inheritDoc} */
throw new UnsupportedOperationException("Use #trace(Marker, String) instead.");
}
/** {@inheritDoc} */
throw new UnsupportedOperationException("Use #debug(Marker, String) instead.");
}
/** {@inheritDoc} */
throw new UnsupportedOperationException("Use #debug(Marker, String) instead.");
}
/** {@inheritDoc} */
throw new UnsupportedOperationException("Use #debug(Marker, String) instead.");
}
/** {@inheritDoc} */
throw new UnsupportedOperationException("Use #debug(Marker, String) instead.");
}
/** {@inheritDoc} */
throw new UnsupportedOperationException("Use #debug(Marker, String, Throwable) instead.");
}
/** {@inheritDoc} */
throw new UnsupportedOperationException("Use #debug(Marker, String) instead.");
}
/** {@inheritDoc} */
throw new UnsupportedOperationException("Use #debug(Marker, String) instead.");
}
/** {@inheritDoc} */
throw new UnsupportedOperationException("Use #debug(Marker, String) instead.");
}
/** {@inheritDoc} */
throw new UnsupportedOperationException("Use #info(Marker, String) instead.");
}
/** {@inheritDoc} */
throw new UnsupportedOperationException("Use #info(Marker, String) instead.");
}
/** {@inheritDoc} */
throw new UnsupportedOperationException("Use #info(Marker, String) instead.");
}
/** {@inheritDoc} */
throw new UnsupportedOperationException("Use #info(Marker, String) instead.");
}
/** {@inheritDoc} */
throw new UnsupportedOperationException("Use #info(Marker, String, Throwable) instead.");
}
/** {@inheritDoc} */
throw new UnsupportedOperationException("Use #info(Marker, String) instead.");
}
/** {@inheritDoc} */
throw new UnsupportedOperationException("Use #info(Marker, String) instead.");
}
/** {@inheritDoc} */
throw new UnsupportedOperationException("Use #info(Marker, String) instead.");
}
/** {@inheritDoc} */
throw new UnsupportedOperationException("Use #warn(Marker, String) instead.");
}
/** {@inheritDoc} */
throw new UnsupportedOperationException("Use #warn(Marker, String) instead.");
}
/** {@inheritDoc} */
throw new UnsupportedOperationException("Use #warn(Marker, String) instead.");
}
/** {@inheritDoc} */
throw new UnsupportedOperationException("Use #warn(Marker, String) instead.");
}
/** {@inheritDoc} */
throw new UnsupportedOperationException("Use #warn(Marker, String, Throwable) instead.");
}
/** {@inheritDoc} */
throw new UnsupportedOperationException("Use #warn(Marker, String) instead.");
}
/** {@inheritDoc} */
throw new UnsupportedOperationException("Use #warn(Marker, String) instead.");
}
/** {@inheritDoc} */
throw new UnsupportedOperationException("Use #warn(Marker, String) instead.");
}
/** {@inheritDoc} */
throw new UnsupportedOperationException("Use #error(Marker, String) instead.");
}
/** {@inheritDoc} */
throw new UnsupportedOperationException("Use #error(Marker, String) instead.");
}
/** {@inheritDoc} */
throw new UnsupportedOperationException("Use #error(Marker, String) instead.");
}
/** {@inheritDoc} */
throw new UnsupportedOperationException("Use #error(Marker, String) instead.");
}
/** {@inheritDoc} */
throw new UnsupportedOperationException("Use #error(Marker, String, Throwable) instead.");
}
/** {@inheritDoc} */
throw new UnsupportedOperationException("Use #error(Marker, String) instead.");
}
/** {@inheritDoc} */
throw new UnsupportedOperationException("Use #error(Marker, String) instead.");
}
/** {@inheritDoc} */
throw new UnsupportedOperationException("Use #error(Marker, String) instead.");
}
}