You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Anna Bikkina <an...@pinksheets.com> on 2004/03/02 23:00:16 UTC
Logging in cocoon
Hi,
I want to log some details to a user defined log file(specified in web.xml).
How can I do that from my xsp,java and xsp files used in the cocoon. Can
someone please direct me to some examples.
Right now I am using getLogger() . I guess this logs in sitemap.xmap. Also I
am not able to log debug messages. It only logs error messages in error.log
Thanks,
Anna.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Logging in cocoon
Posted by Rolf Schumacher <ro...@hamburg.de>.
Sorry, was too blind to see how simple the ingenius avalon/cocoon people
had made logging.
For all those who likes "hello world" to start with:
...
import org.apache.log.Hierarchy;
import org.apache.log.Logger;
...
private Logger logger;
...
logger = Hierarchy.getDefaultHierarchy().getLoggerFor("myLog");
...
logger.info( "hello world" );
...
With additions to logkit.xconf:
in targets:
<cocoon id="myLog">
<filename>${context-root}/WEB-INF/logs/myLog.log</filename>
<format type="cocoon"> %7.7{priority} %{time} %{category}:
%{message}\n%{throwable}</format>
<append>false</append>
</cocoon>
in catagories:
<category log-level="INFO" name="myLog">
<log-target id-ref="myLog"/>
</category>
The result appears in myLog.log in the directory where all other cocoon
logs get written to.
Rolf
Rolf Schumacher wrote:
> John L. Webber wrote:
>
>> Anna,
>>
>> There's a very detailed article on the Cocoon Wiki:
>> http://wiki.cocoondev.org/Wiki.jsp?page=ConfiguringTheLogs
>>
>> Anna Bikkina wrote:
>>
>>> Hi,
>>>
>>> I want to log some details to a user defined log file(specified in
>>> web.xml).
>>> How can I do that from my xsp,java and xsp files used in the cocoon.
>>> Can someone please direct me to some examples.
>>>
>>>
>>
> Anna, do you managed to use Cocoons log facilities?
> I don't. Maybe I'm too blind to see "how simple" it is
> or this might be a facility for those super smart people
> of the (ever shrinking) inner circle.
>
> Rolf
Re: Logging in cocoon
Posted by Rolf Schumacher <ro...@hamburg.de>.
John L. Webber wrote:
> Anna,
>
> There's a very detailed article on the Cocoon Wiki:
> http://wiki.cocoondev.org/Wiki.jsp?page=ConfiguringTheLogs
>
> Anna Bikkina wrote:
>
>> Hi,
>>
>> I want to log some details to a user defined log file(specified in
>> web.xml).
>> How can I do that from my xsp,java and xsp files used in the cocoon.
>> Can someone please direct me to some examples.
>>
>>
>
Anna, do you managed to use Cocoons log facilities?
I don't. Maybe I'm too blind to see "how simple" it is
or this might be a facility for those super smart people
of the (ever shrinking) inner circle.
Rolf
Re: Logging in cocoon
Posted by "John L. Webber" <Jo...@jentro.com>.
Anna,
There's a very detailed article on the Cocoon Wiki:
http://wiki.cocoondev.org/Wiki.jsp?page=ConfiguringTheLogs
Anna Bikkina wrote:
>Hi,
>
>I want to log some details to a user defined log file(specified in web.xml).
>
>How can I do that from my xsp,java and xsp files used in the cocoon. Can
>someone please direct me to some examples.
>
>
--
---------------------------------------------------------
Jentro Technologies GmbH
John L. Webber, Software Development
---------------------------------------------------------
Rosenheimer Str. 145e 81671 München
Tel. +49 89 189 169 80 mailto:John.Webber@jentro.com
Fax +49 89 189 169 99 http://www.jentro.com
---------------------------------------------------------
NOTICE: The information contained in this e-mail is confidential or may otherwise be legally privileged. It is intended for the named recipient only. If you have received it in error, please notify us immediately by reply or by calling the telephone number above and delete this message and all its attachments without any use or further distribution of its contents. Please note that any unauthorised review, copying, disclosing or otherwise making use of the information is strictly prohibited. Thank you.
---------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Logging in cocoon
Posted by Jan Hoskens <jh...@schaubroeck.be>.
I don't know how to setup your own log file, but you can specify your
log-level in the file cocoon/WEB-INF/logkit.xconf. e.g. change your
sitemap's log-level to DEBUG.
Kind Regards,
Jan
----- Original Message -----
From: "Anna Bikkina" <an...@pinksheets.com>
To: <us...@cocoon.apache.org>
Sent: Tuesday, March 02, 2004 11:00 PM
Subject: Logging in cocoon
> Hi,
>
> I want to log some details to a user defined log file(specified in
web.xml).
>
> How can I do that from my xsp,java and xsp files used in the cocoon. Can
> someone please direct me to some examples.
>
> Right now I am using getLogger() . I guess this logs in sitemap.xmap. Also
I
> am not able to log debug messages. It only logs error messages in
error.log
>
> Thanks,
> Anna.
>
>
> ---------------------------------------------------------------------
> 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