Hi,

I have the following situation.
I need to log all users login into the application AND in addition I need to
log them into their own individual files. So I have one config file for the
main log that will log everything, and I add appenders programmatically for
the individual log files for each user who logs in.
The problem that I am running into is that depending on how the application
is deployed, I cannot know where the logs are going to go.
If I specify no location at all, the for example when I deploy the
application on Linux (I am using the Resin server)  - the log files end up
in the installation directory for the web server.
On windows, they are nowhere to be found.
Additionally, if the application does not reside in the webapps directory of
the server  but the server is started elsewhere and pointed to the root
folder of the application - the logs are again, hard to find.

I need to be able to specify explicitly where the logs are going to go, so
that regardless of where or how I deploy the application, all I have to do
is change for example the context init parameters in web.xml (or some other
config file) and be able to direct the logs exactly where I want them to go
on the file system. And I have to be able to do it both for the main logger
and for the appenders that are added programmatically. So both in my Java
code, and in the log4j.xml.


Could you please suggest how this can be done?

Reply via email to