You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by fl...@fastwebnet.it on 2003/12/30 09:47:47 UTC
problem with logs
Hi all,
i wrote a little action in which i send messages using getLogger().debug(..)
or getLogger().error(..) or getLogger().warn(..) ; the question is where
can i find the messages sent ?
I need to switch some parameters to activate loggers ?
May i redirect messages to my own log file ?
many thanks
Flavio
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: problem with logs
Posted by Flavio Palumbo <fl...@fastwebnet.it>.
I choose the second way and it works perfectly.
thanks a lot
Flavio
>-- Original Message --
>Reply-To: users@cocoon.apache.org
>Date: Tue, 30 Dec 2003 10:18:18 +0100
>From: Stephan Coboos <cr...@gmx.net>
>To: users@cocoon.apache.org
>Subject: Re: problem with logs
>
>
>[1. solution]
You have to do 2 steps:
1.) Give your action a name in the sitemap using the logger="...."
attribute. For example "myAction".
2.) Register this logger-name in logkit.conf by creating this two entries:
...
<categories>
...
<cat
>gory log-level="DEBUG" name="myAction">
<log-target id-ref="loginAction"/>
<log-target id-ref="error"/>
</category>
...
and
<targets>
...
<cocoon id="myAction">
<filename>${context-root}/WEB-INF/logs/myAction.lo
></filename>
<format type="cocoon">
%7.7{priority} %{time} [%{category}] (%{uri})
%{thread}/%{class:short}: %{message}\n%{throwable}
</format>
<append>false</append>
</cocoon>
...
Note that you have to set the
>og level to DEBUG!
After restarting cocoon, you can find the logs for you action in
WEB-INF/logs/myAction.log.
[2. solution]
You have to do although 2 steps:
1.) Give your action an name in the sitemap using the logger="...."
attribute. The n
>me should start with "sitemap". For example
"sitemap.myAction".
2.) Search for the following entry in logkit.xconf and switch log-level
to DEBUG:
<category log-level="INFO" name="sitemap">
After restarting cocoon you can find your logs for y
>ur action in
WEB-INF/logs/sitemap.log.
Regards
Stephan
flavio.palumbo@fastwebnet.it wrote:
>Hi all,
>
>i wrote a little action in which i send messages using getLogger().debug(..)
>or getLogger().error(..) or getLogger().warn(..) ; the
>question is where
>can i find the messages sent ?
>I need to switch some parameters to activate loggers ?
>May i redirect messages to my own log file ?
>
>many thanks
>
>Flavio
>
>
>----------------------------------------------------------
>----------
>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail:
>users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: problem with logs
Posted by Stephan Coboos <cr...@gmx.net>.
[1. solution]
You have to do 2 steps:
1.) Give your action a name in the sitemap using the logger="...."
attribute. For example "myAction".
2.) Register this logger-name in logkit.conf by creating this two entries:
...
<categories>
...
<category log-level="DEBUG" name="myAction">
<log-target id-ref="loginAction"/>
<log-target id-ref="error"/>
</category>
...
and
<targets>
...
<cocoon id="myAction">
<filename>${context-root}/WEB-INF/logs/myAction.log</filename>
<format type="cocoon">
%7.7{priority} %{time} [%{category}] (%{uri})
%{thread}/%{class:short}: %{message}\n%{throwable}
</format>
<append>false</append>
</cocoon>
...
Note that you have to set the log level to DEBUG!
After restarting cocoon, you can find the logs for you action in
WEB-INF/logs/myAction.log.
[2. solution]
You have to do although 2 steps:
1.) Give your action an name in the sitemap using the logger="...."
attribute. The name should start with "sitemap". For example
"sitemap.myAction".
2.) Search for the following entry in logkit.xconf and switch log-level
to DEBUG:
<category log-level="INFO" name="sitemap">
After restarting cocoon you can find your logs for your action in
WEB-INF/logs/sitemap.log.
Regards
Stephan
flavio.palumbo@fastwebnet.it wrote:
>Hi all,
>
>i wrote a little action in which i send messages using getLogger().debug(..)
>or getLogger().error(..) or getLogger().warn(..) ; the question is where
>can i find the messages sent ?
>I need to switch some parameters to activate loggers ?
>May i redirect messages to my own log file ?
>
>many thanks
>
>Flavio
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org