Created
September 26, 2011 06:53
-
-
Save khannedy/1241743 to your computer and use it in GitHub Desktop.
Basic Configuration Apache Log4j
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (c) 2011, StripBandunk and/or its affiliates. All rights reserved. | |
* | |
* http://stripbandunk.com/ | |
* | |
* STRIPBANDUNK PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. | |
*/ | |
package khannedy.belajar.belajarlog4j; | |
import org.apache.log4j.BasicConfigurator; | |
import org.apache.log4j.LogManager; | |
import org.apache.log4j.Logger; | |
/** | |
* | |
* @author Eko Kurniawan Khannedy | |
*/ | |
public class BasicApp { | |
/** | |
* @param args the command line arguments | |
*/ | |
public static void main(String[] args) { | |
// Basic Configuration | |
BasicConfigurator.configure(); | |
// Create Logger | |
Logger logger = Logger.getLogger(BasicApp.class); | |
logger.info("Simple log message"); | |
// Shuwdown Logger | |
LogManager.shutdown(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment