0
Handler h = new FileHandler("MyDailyLogFile_" + sdf.format(date)
                    + ".log", true);

I am looking produce daily log file for my application. I have a run script in directory home\lse\scripts from which the application runs. This is where all the logs files get saved. The environment is UNIX. I would like to specify the log files to be saved in home\lse\logs. How do I specify the logs directory within FileHandler() ?

MooHa
  • 819
  • 3
  • 11
  • 23

2 Answers2

0

Take a look at the javadoc. Maybe you can specify this in the pattern.

Pieter
  • 895
  • 11
  • 22
0
Handler h = new FileHandler("../logs/MyDailyLogFile_" + sdf.format(date)
                    + ".log", true);
MooHa
  • 819
  • 3
  • 11
  • 23