Java slf4j Logger getLogger(Class clazz)

Here you can find the source of getLogger(Class clazz)

Description

Gets the logger from the servicelocator

License

Open Source License

Parameter

Parameter Description
clazz the class needed for the logger

Return

the Log object

Declaration

public static Logger getLogger(Class clazz) 

Method Source Code


//package com.java2s;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class Main {
    /**//from   w ww.j a  va  2  s.  c  o  m
     * Gets the logger from the servicelocator
     *
     * @param clazz the class needed for the logger
     * @return the Log object
     */
    public static Logger getLogger(Class clazz) {
        return LoggerFactory.getLogger(clazz);
    }

    /**
     * Gets the logger from the servicelocator
     *
     * @param name of the appender for the logger
     * @return the Log object
     */
    public static Logger getLogger(String name) {
        return LoggerFactory.getLogger(name);
    }
}

Related

  1. getIntValue(String strVal, int defVal)
  2. getLog(Class clazz)
  3. getLogger()
  4. getLogger()
  5. getLogger()
  6. getLogger(Class clazz)
  7. getLogger(Class clazz)
  8. getLogger(String className)
  9. getLoggerForCurrentClass()