cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Fernando.Matom...@thomson.com>
Subject RE: flow not logging
Date Wed, 03 May 2006 12:10:48 GMT
I don't use logkit. I use log4j

Thanks

-----Original Message-----
From: Ard Schrijvers [mailto:a.schrijvers@hippo.nl] 
Sent: Wednesday, May 03, 2006 1:52 PM
To: users@cocoon.apache.org
Subject: RE: flow not logging

probably in your logkit.xconf:

Add to <targets>

<!-- The logger for the flow layer -->
    <cocoon id="flow">
      <filename>${context-root}/WEB-INF/logs/flow.log</filename>
      <format type="cocoon">
        %23.23{time:yyyy-MM-dd' 'HH:mm:ss.SSS} %5.5{priority}
%40.40{category} (%{host}%{uri}) %{thread}/%{class:short}:
%{message}\n%{throwable}
      </format>
      <append>false</append>
      <rotation type="unique" pattern="-yyyy-MM-dd_HH.mm" suffix=".log">
        <or>
          <size>10m</size>
          <time>24:00:00</time>
        </or>
      </rotation>
    </cocoon>


and in <categories> 

<category name="flow" log-level="DEBUG">
      <log-target id-ref="flow"/>
</category>

That should results in flow debug statements in flow.log

Regards Ard

-- 

Hippo
Oosteinde 11
1017WT Amsterdam
The Netherlands
Tel  +31 (0)20 5224466
-------------------------------------------------------------
a.schrijvers@hippo.nl / http://www.hippo.nl
-------------------------------------------------------------- 



> 
> 
> Where is this flow log level set? There's nothing related to flow in
> log4j.xconf
> 
> -----Original Message-----
> From: Ard Schrijvers [mailto:a.schrijvers@hippo.nl] 
> Sent: Wednesday, May 03, 2006 12:57 PM
> To: users@cocoon.apache.org; Andre.Juffer@oulu.fi
> Subject: RE: flow not logging
> 
> Since he is getting other DEBUG messages I think the problem 
> is that he
> has the flow log level set to WARN instead of DEBUG.
> 
> Also wrap your debug statement always with 
> if (cocoon.log.isDebugEnabled())
> (if you don't the debug statement is first computed, and then checked
> for debug level. In production, this only costs you processingtime)
> 
> You can also print cocoon.log.isDebugEnabled() to the commant line to
> see if you have flow DEBUG enable. 
> 
> Regards Ard 
> 
> Hippo
> Oosteinde 11
> 1017WT Amsterdam
> The Netherlands
> Tel  +31 (0)20 5224466
> -------------------------------------------------------------
> a.schrijvers@hippo.nl / http://www.hippo.nl
> -------------------------------------------------------------- 
> 
> > Fernando.Matomira@thomson.com wrote:
> > > Hello,
> > > 
> > >  
> > > 
> > > I am using cocoon.log.debug() in flow but nothing is output 
> > in the log file.
> > > 
> > > I see DEBUG messages from other parts of cocoon.
> > > 
> > > I am using log4j
> > 
> > Look in WEB-INF/web.xml for the following:
> > 
> >      <!--
> >        If you want to configure log4j using Cocoon, then you 
> > can define
> >        an XML configuration file here. You can use the usual 
> > log4j property
> >        substituation mechanism, e.g. ${context-root} is 
> > replaced by the
> >        context root of this web application etc.
> >        You can configure the log4j configuration even if you 
> > use LogKit
> >        for Cocoon logging. You can use this to configure 
> > third party code
> >        for example.
> >      -->
> >        <init-param>
> >          <param-name>log4j-config</param-name>
> >          <param-value>/WEB-INF/log4j.xconf</param-value>
> >        </init-param>
> > 
> > 
> > You should check whether the <init-param> ... </init-param> is 
> > uncommented. Restart your servlet engine if you need to 
> make changes.
> > 
> > > 
> > >  
> > > 
> > > Thanks
> > > 
> > >  
> > > 
> > >  
> > > 
> > 
> > 
> > -- 
> > Andre H. Juffer              | Phone: +358-8-553 1161
> > The Biocenter and            | Fax: +358-8-553-1141
> >      the Dep. of Biochemistry | Email: Andre.Juffer@oulu.fi
> > University of Oulu, Finland  | WWW: 
www.biochem.oulu.fi/Biocomputing/
> 
> ---------------------------------------------------------------------
> 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


---------------------------------------------------------------------
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


Mime
View raw message