aspose file tools
The moose likes Beginning Java and the fly likes create log file Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "create log file" Watch "create log file" New topic
Author

create log file

Joyce Leung
Greenhorn

Joined: Mar 20, 2010
Posts: 4
i just start learning java, the first step is how can i write a log file info txt file ?
any example for my reference?

thanks sir or madam.
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 16813
    
  19

Joyce Leung wrote:i just start learning java, the first step is how can i write a log file info txt file ?
any example for my reference?


Here is a reference to the Sun logging tutorial.There are a few examples in the tutorial.

http://download.oracle.com/javase/1.4.2/docs/guide/util/logging/overview.html


The most popular logging engine is log4J, which is another option you can use.

http://logging.apache.org/log4j/1.2/

Henry

Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
Sunny Bhandari
Ranch Hand

Joined: Dec 06, 2010
Posts: 446

log4j will give you more power.

But the default logger available with Java is sufficient if you are just starting off.
Wouter Oet
Saloon Keeper

Joined: Oct 25, 2008
Posts: 2700

There are a whole lot of logging frameworks out there. Log4j is one of the most popular ones. I prefer the "successor" of log4j: slf4j with the logback implementation. Slf4j separates the api from the actual implementation and can be used in conjunction with log4j. Log4j, slf4j and logback are all made by Ceki Gülcü.


"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." --- Martin Fowler
Please correct my English.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: create log file
 
Similar Threads
cewolf charts color
log4j - log to a file
Need help on a java topic
System.out.println statement donot show in tomact 5.0 console
Simple JBoss Web Service With Eclipse