We are having a web application using log4j deployed on weblogic 9.2
We are using log4j for application logging. When giving the log file name for the file appender
without the path the log file gets generated in the domain folder of weblogic server
But if I add any path to it the log file doesnt get generated
None of the above combination works.
I even tried manually creating the xyzlogs folder under the doamin folder on weblogic server but still the log file doesnt get generated.
That may not be possible every time. On development it could be D: where as on QA or production it could be F: or H:
Also sometimes the development is on Windows and QA/Prod are Unix servers.
posted 10 years ago
you can also try moving log4j properties file out of WAR into root of weblogic domain where WAR is deployed. I thought this is a best approach as when ever you do make any changes you dont need re-deploy the WAR but yes you need to bounce the server
To answer you question. I think i also got this issue. Some times when you do'nt mention absolute path, it may create the log files under root drive where domain is running. For eg, if your domain is running under c:\domains\sampleDomain it may create log file under c:\xyzlogs\xyz.log
Check it out and also make sure you have enabled the appender you are refering.