Hi,
I am a beginner to the Log4J community and was inetersted to use this to log
my Sys.out to specific txt files.

My Code
=======
import org.apache.log4j.*;


public class Class1 {
      public static void main(String args[]){
          BasicConfigurator.configure();

        Category cat = Category.getInstance(Class1.class.getName());

          //cat.addAppender(A1); ******* I tried this step but could not
follow how to direct output to a file

        cat.setPriority(Priority.DEBUG);
        cat.warn("Low fuel level.");
        cat.debug("Starting search for nearest gas station.");
      }//end of main

}//end of Class1

The Purpose of my application is to direct the Sys.out to a log file say
C:\Test.log.txt.
Obviously I am missing something....some intermediate step.

Can anyone please let me know how to solve this? Any URL or sample code is
welcome.

I apologise for sounding so illiterate.

Thanks and Regards,

Prodi.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to