Logger Log3() Example

Log a message, with an array of object arguments.


Loggerclass Log3() method example. This example shows you how to use Log3() method.This method Log a message, with an array of object arguments.

Here is the code:-
/* 
 * @Program that Log a message, with an array of object arguments.
 * Log3.java 
 * Author:-RoseIndia Team
 * Date:-1-July-2008
 */

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

public class Log3 {
    public static void main(String[] args) {
    Logger logger=Logger.getLogger("girish.log");
    String s[]={"r","o","s","e"};
    //Log a message, with an array of object arguments.
    logger.log(Level.WARNING,"Roseindia.net",s);
    }
}

Output of the program:-
 1 Jul, 2008 4:38:03 PM Log3 main
WARNING: Roseindia.net

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

HOME | COPYRIGHT | CONTACT US