Paul Clapham wrote:
al yosha wrote:Do you mean create the log directory one level up from where it is at the moment? Why would this make a difference?
I don't think it would make a difference either.
But what have you established so far? You said that your log file was "empty". That implies to me that something created the log file, or you would have said it doesn't exist. Did you do that, or did log4j do it? (Or does it in fact not exist?)
shalindra Singh Suryvanshee wrote:you may write like below -
RollingFileAppender appender =
new RollingFileAppender(new PatternLayout("%-4r [%t] %-5p %c %x - %m%n")
, getServletContext().getRealPath("/logs/error.log"), true);
your logs directory would be parallel to WEB-INF.
Try out this.
Thanks
Shalindra Singh