Created
March 24, 2012 09:24
-
-
Save THUFIR/2180574 to your computer and use it in GitHub Desktop.
java logging
This file contains 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
thufir@dur:~$ | |
thufir@dur:~$ java -jar NetBeansProjects/GweneTest/dist/GweneTest.jar | |
Gwene... | |
...Gwene | |
thufir@dur:~$ | |
thufir@dur:~$ cat NetBeansProjects/GweneTest/src/logs/GweneMain.java | |
/* | |
* To change this template, choose Tools | Templates | |
* and open the template in the editor. | |
*/ | |
package logs; | |
import java.io.IOException; | |
import static java.lang.System.out; | |
import java.net.SocketException; | |
import java.sql.SQLException; | |
import java.util.logging.Level; | |
import java.util.logging.LogManager; | |
import java.util.logging.Logger; | |
/** | |
* | |
* @author thufir | |
*/ | |
public class GweneMain { | |
private static final Logger logger = Logger.getLogger(GweneMain.class.getName()); | |
private static LogManager lMgr = LogManager.getLogManager(); | |
private String logFile = "example"; | |
private String oralog = "example2"; | |
/** | |
* @param args the command line arguments | |
*/ | |
public static void main(String[] args) { | |
out.println("Gwene..."); | |
logger.log(Level.INFO, "test log"); | |
out.println("...Gwene"); | |
} | |
} | |
thufir@dur:~$ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment