Logger Log1() Example

Log a message, with no arguments.


Loggerclass Log1() method example. This example shows you how to use Log1() method.This method Log a message, with no arguments.

Here is the code:-
/* 
 * @Program that Log a message, with no arguments.
 * Log1.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 Log1 {

    public static void main(String[] args) {
        Logger logger = Logger.getLogger("girish.log");
        //Log a message, with no arguments.
        logger.log(Level.WARNING, "Roseindia.net");
        logger.log(Level.WARNING, "is a softwaredevelopment company");
    }
}

Output of the program:-
 1 Jul, 2008 4:20:17 PM Log1 main
WARNING: Roseindia.net
1 Jul, 2008 4:20:17 PM Log1 main
WARNING: is a softwaredevelopment company

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

HOME | COPYRIGHT | CONTACT US