Howdy,
"What are make files" is an opening for a long philosophical debate
I'm not going to go into ;)  (Except to say one thing: Ant!)

The DailyRollingFileAppender always writes to one file, then rolls it
over.  The file it writes to doesn't have a timestamp, only the past
files do.  And you have to keep your JVM running through the rollover
period for it to happen.

So for example, let's say you have a DailyRollingFileAppender with
an hourly rollover pattern, file named "foo.log."  When you start 
logging, foo.log will be created and will be written to.  If the JVM
is running for over an hour, the file will be rolled over to 
foo.log.[date_pattern], a new foo.log will be created, and log4j will
write to foo.log.  The earlier file is closed and never opened again.
Of course, if you stop the JVM or never log to the file before the 
rollover occurs, it won't occur, so the next time you start the JVM
you'll be writing into the old file ;)

I hope this helps,

Yoav

ramesh wrote:
> 
> hai all,
> 
>         i am very to new log4j and loggers too. I have confidence with the help of
> the mailing list i can go ahed. So please help me.
> 
>         I am not getting what are the make files? how the dailyrollingfileappender
> works.  '.'yyyy-MM-dd-HH, '.'yyyy-MM-dd-HH-mm.  What i understood is if we
> set this pattern it will creates log files for every hour,minute
> respectively. But in my case it is not happening.  all data is storing in
> the same log file. The sample code i written is,
> 
>                 public static void main(String
> ){
>                 Category c = Category.getInstance(log2.class);
>                 SimpleLayout p = new SimpleLayout();
>                 String date="\'.\'yyyy-MM-dd-HH-mm" ;
>                 DailyRollingFileAppender d = new 
>DailyRollingFileAppender(p,"log.log",date);
>                 System.out.println(d.getDatePattern());
>                 BasicConfigurator.configure(d);
>                 }
> 
> and another thing is, In the tutorial it has given that, after creating make.loc 
>file type "make lib" at commend prompt.
> 
> what is this 'make' where it is? how i have to use. PLsease give me any suggession. 
>any suggesion is very useful for me.
> If any body having examples please give to me.
> 
> the make.loc file i created is
> 
> JAVAC:=c:\jdk1.3\javac
> JAVAC_FLAGS:=-depend
> CLASS_DIR:=c:\test\classes
> 
> so please suggest me the solutions for these.
> 
> waiting for your help,
> ramesh
> [EMAIL PROTECTED]
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

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

Reply via email to