Logger Logrb() Example

Log a message, specifying source class, method, and resource bundle name with no arguments.


Loggerclass Logrb() method example. This example shows you how to use Logrb() method.This method Log a message, specifying source class, method, and resource bundle name with no arguments.

Here is the code:-
/* 
 * @Program that Log a message, specifying source class, method, and resource 
bundle name with no arguments.
 * Logrb.java 
 * Author:-RoseIndia Team
 * Date:-1-July-2008
 */

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

public class Logrb {
   public static void main(String[] args) {
   Logger logger = Logger.getLogger("girish.log");
        Level level = Level.parse("WARNING");
        String sourceClass = "Roseindia .net";
        String sourceMethod = "login";
        String bundleName="ABC";
        String msg = "Welcome to roseindia.net";
      logger.logrb(level, sourceClass, sourceMethod, bundleName, msg)
    }
}

Output of the program:-
 1 Jul, 2008 4:59:49 PM Roseindia .net login
WARNING: Welcome to roseindia.net
java.lang.Throwable: File not found

Post Comment
Name:
E-mail:
Contact no :
Comments:
  Refresh Image
Verify Image:
 
 
Your Comment's
 
 
 

HOME | COPYRIGHT | CONTACT US