Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  * Copyright 2001-2004 The Apache Software Foundation.
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * See the License for the specific language governing permissions and
 * limitations under the License.
package org.apache.log4j;

This class is a minimal implementation of the original org.apache.log4j.Logger class (as found in log4j 1.2) delegating all calls to a org.slf4j.Logger instance.

Ceki Gülcü
public class Logger extends Category {
  private static final String LOGGER_FQCN = Logger.class.getName();
  protected Logger(String name) {
  public static Logger getLogger(String name) {
    return Log4jLoggerFactory.getLogger(name);
  public static Logger getLogger(String nameLoggerFactory loggerFactory) {
    return Log4jLoggerFactory.getLogger(name,loggerFactory);
  public static Logger getLogger(Class clazz) {
    return getLogger(clazz.getName());
Does the obvious.

  public static Logger getRootLogger() {
    return Log4jLoggerFactory.getLogger(...);

Delegates to org.slf4j.Logger.isTraceEnabled() method of SLF4J.
  public boolean isTraceEnabled() {
    return .isTraceEnabled();
Delegates to org.slf4j.Logger.trace(java.lang.String) method in SLF4J.
  public void trace(Object message) {

  public void trace(Object messageThrowable t) {
New to GrepCode? Check out our FAQ X