Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where do I find the logs of System.out.println()?

I'm using Netbeans and I've checked the Server.log and all 3 output tabs in Netbeans for Glassfish, Java DB Database and my app's output. Where should I be seeing the output of System.out.println() ? I'm trying to connect to a MySQL server and I need to see if it worked or not :)

like image 400
Ben Avatar asked Dec 16 '11 03:12

Ben


People also ask

Where do I find system out Println?

System: It is a final class defined in the java. lang package. out: This is an instance of PrintStream type, which is a public and static member field of the System class. println(): As all instances of PrintStream class have a public method println(), hence we can invoke the same on out as well.

Why logger is use instead of system out Println?

If you are running a Java program in Linux or any UNIX-based system, Log4j or SLF4j or any other logging framework offers a lot more features, flexibility, and improvement on message quality, which is not possible using the System. out. println() statement.


1 Answers

Turns out that I need to run the app in debug mode to see the output of System.out.println() in the glassfish console

like image 192
Ben Avatar answered Sep 21 '22 20:09

Ben