Hi,
having the following configuration in my log4j.xml file:
is it possible to specify the log directory where should be created? In other
words, is it possible to specify the root directory for loggin
I am trying to use LOG4J on OpenVMS. However, my logger is not rolling over
on OpenVMS. So I want to know how the code is determining when the log file
should be rolled over. Below I am posting my code and properties file. The
same code works on windows (of course, I have different properties
The date pattern that you have:
log4j.appender.R.DatePattern='.'-MM
Will only roll the files over on a monthly basis. Just want to be sure that
this is what you intend?
If this is the intended behavior, I'd check to make sure that a different log4j
configuration file isn't being loade
Yes, this is what I am wanting.
The original log file was created in April and now when items are written to
file the log file still has not been rolled over.
Since the application is writing to the specified log file, then wouldn't
that mean that these properties posted would be the ones being
Also, to give further information. In Java, you cannot read the "created"
date on a file as only certain operating systems understand it (namely,
OpenVMS and Windows). So, how does the logging engine know when to roll
over? Is it looking inside the log file for date patterns? Here a sample
of
I am fairly new to LOG4J, but you can set up a Properties object in your
application and use that to initialize the LOG4J engine. Here is a small
snippet of code to get you started. So with this method, you can use any
logic you need to specify the filename.
String myTempFirDir = "..."; //logi
Hello,
I've a problem adding a Filter at runtime.
My log4j.properties looks like this:
--- cut
log4j.rootLogger=info, stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
--- cut
During runtime I want to add a new FileAppender
Hi Heri,
that is exactly I was searching for. Thank you for your advise. It works
perfect.
Jason
--
You cannot get access to the file object itself for reading purpose because the
FileAppender uses a FileWriter class for writing to the file. But you can learn