ceki        2005/04/28 09:22:27

  Added:       src/java/org/slf4j/impl Log4jLoggerFA.java
  Log:
  
  
  Revision  Changes    Path
  1.1                  logging-log4j/src/java/org/slf4j/impl/Log4jLoggerFA.java
  
  Index: Log4jLoggerFA.java
  ===================================================================
  /*
   * Copyright 1999,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
   *
   *      http://www.apache.org/licenses/LICENSE-2.0
   *
   * Unless required by applicable law or agreed to in writing, software
   * distributed under the License is distributed on an "AS IS" BASIS,
   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   * See the License for the specific language governing permissions and
   * limitations under the License.
   */
  
  package org.slf4j.impl;
  
  import org.apache.log4j.LogManager;
  import org.apache.ugli.LoggerFactoryAdapter;
  import org.apache.ugli.ULogger;
  
  /**
   * This factory adapter relies on log4's [EMAIL PROTECTED] LogManager} to do 
its job.
   * 
   * @author Ceki Gülcü
   *
   */
  public class Log4jLoggerFA implements LoggerFactoryAdapter {
  
    public Log4jLoggerFA() {
    }
  
    /**
     * Get a [EMAIL PROTECTED] ULogger} by name, by delegating all work to 
log4's 
     * [EMAIL PROTECTED] LogManager}.
     * 
     * <p>The implementation is trivial because log4j 
     * [EMAIL PROTECTED] org.apache.log4j.Logger loggers} directly implement 
the 
     * [EMAIL PROTECTED] ULogger} interface.
     */
    public ULogger getLogger(String name) {
      return LogManager.getLogger(name);  
    }
  
    /**
     * Get a [EMAIL PROTECTED] ULogger} by domain and subdomain name, by 
delegating all work 
     * to log4's [EMAIL PROTECTED] LogManager}.
     * 
     * <p>The implementation is trivial because log4j 
     * [EMAIL PROTECTED] org.apache.log4j.Logger loggers} directly implement 
the 
     * [EMAIL PROTECTED] ULogger} interface.
     */
    public ULogger getLogger(String domainName, String subDomainName) {
      return LogManager.getLogger(domainName);  
    }
  }
  
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to