Logger: getLogger(String name) : Logger « java.util.logging « Java by API






Logger: getLogger(String name)

  
import java.util.logging.Logger;

public class MainClass {
  public static void main(String[] args) {
    Logger logger = Logger.getLogger("DeviceLog");

    logger.info("<Device id=\"99\"/>");
  }
}

           
         
    
  








Related examples in the same category

1.Logger: addHandler(Handler handler)
2.Logger: config(String msg)
3.Logger: exiting(String sourceClass, String sourceMethod, Object result)
4.Logger: fine(String msg)
5.Logger: finer(String msg)
6.Logger: finest(String msg)
7.Logger: getAnonymousLogger()
8.Logger: info(String msg)
9.Logger: isLoggable(Level level)
10.Logger: logp(Level level, String sourceClass, String sourceMethod, String msg)
11.Logger: severe(String msg)
12.Logger: setFilter(Filter newFilter)
13.Logger: setUseParentHandlers(boolean useParentHandlers)
14.Logger: warning(String msg)