Schaible, J�rg wrote:
Hi Berin,
Argh. It is *not* working. The existing log file was
created during a
unit test with HttpUinit's ServletContainer. This seems to
prove you
assumption right and Tomcat prevents the log file generation. Not
that I have currently an idea, where to change this ... :(
It depends on the security manager. You may have to change
it in the
$JAVA_HOME/jre/lib/security/ location. Other times, the servlet
container has those permissions in a local file.
Another solution is to place the log file in the work directory or
something like that.
Finally I found the log file <g>! After debugging the code I had to detect, that the file could be properly created, but it was located in the workspace of Eclipse and that is really totally at another location compared to my project. So how can I influence the location of the file in the xlog?
<targets>
<file id="root">
<filename>my-app.log</filename>
<format type="extended">
%7.7{priority} %5.5{time} [%8.8{category}] (%{context}):
%{message}\n%{throwable}
</format>
</file>
</targets>
something like this:
<targets>
<file id="root">
<filename>{impl.workDir}/my-app.log</filename>
<format type="extended">
%7.7{priority} %5.5{time} [%8.8{category}] (%{context}):
%{message}\n%{throwable}
</format>
</file>
</targets>
That is one way. Keep in mind that all of those braketed values are
context entries. Some of them (like the priority, time, etc) are
automatically added by the Excalibur-Logger package.
Another way to do it is to influence the "user.dir" property. The
Context Root is usually specified relative to this value if it is
not absolute.
In servlet environments, I also strongly recommend finding the Servlet's
root context entry, and placing that in the CONTEXT_DIR instead of
defaulting to the "user.dir" entry. It makes for a much more intuitive
environment.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]