Logger Logrb2() Example

Log a message, specifying source class, method, and resource bundle name, with an array of object arguments.


Loggerclass Logrb2() method example. This example shows you how to use Logrb2() method.This method Log a message, specifying source class, method, and resource bundle name, with an array of object arguments.

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

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

public class Logrb2 {

    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, new Object[3]);
    }
}

Output of the program:-
 1 Jul, 2008 5:16:14 PM Roseindia .net login
WARNING: Welcome to roseindia.net

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

HOME | COPYRIGHT | CONTACT US