Logger: logp(Level level, String sourceClass, String sourceMethod, String msg) : Logger « java.util.logging « Java by API






Logger: logp(Level level, String sourceClass, String sourceMethod, String msg)

  


import java.util.logging.Level;
import java.util.logging.Logger;

public class Main {

  private static Logger logger = Logger.getLogger("InfoLogging2");

  public static void main(String[] args) {
    logger.logp(Level.INFO, "InfoLogging2", "main", "Logging an INFO-level message");
  }
}

   
    
  








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: getLogger(String name)
9.Logger: info(String msg)
10.Logger: isLoggable(Level level)
11.Logger: severe(String msg)
12.Logger: setFilter(Filter newFilter)
13.Logger: setUseParentHandlers(boolean useParentHandlers)
14.Logger: warning(String msg)