wood burning stoves*
The moose likes Beginning Java and the fly likes logging Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "logging" Watch "logging" New topic
Author

logging

Jayasri Alaparthi
Ranch Hand

Joined: Aug 14, 2006
Posts: 67
Hi friends,
what is the primary use of logging statements when we have System.out.println statement.
Thanks,
Bhargavi.
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14273
    
  21

A good logging system (like log4j for example) gives you a lot of flexibility and features that you don't get with simple System.out.println statements. For example, by configuring and using log4j properly you can very easily switch between different logging levels - you can for example choose to log only errors, or all debug messages. Also you can let log4j automatically add information to each log message such as a timestamp or a class and method name.

See the log4j documentation for more information.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: logging