Hi Paul, I still cannot log messages from Task, although no problem from
mediator (extend AbstractMediator). For instance, I wrote:
protected static final Log log =
LogFactory.getLog(SynapseConstants.TRACE_LOGGER);
.
.
.
log.trace("execute");
is there something similar to AbstractMediator for the scheduled tasks ?
thanks
Remsy
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Paul Fremantle
Sent: September 19, 2008 10:14 AM
To: [email protected]
Subject: Re: [esb-java-user] using the system logger
Remsy
We use commons-logging and log4j.
There is already a mediator that logs either the whole message, the
headers, or custom fields.
Alternatively you can use commons logging from you own mediators:
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
protected static final Log logger =
LogFactory.getLog("your.log.category.here");
//in the mediate
logger.info("your log message here");
in Log4j.properties:
log4j.category.your.log.category.here=INFO
Paul
Schmilinsky, Remsy wrote:
> Hi. How can I log activities from mediators / tasks using the logging channel
> of the environment ? is it possible ? I don't want to use println.
>
> thanks
>
> Remsy
>
> _______________________________________________
> Esb-java-user mailing list
> [email protected]
> http://mailman.wso2.org/cgi-bin/mailman/listinfo/esb-java-user
>
--
Paul Fremantle
CTO and Co-Founder, WSO2
OASIS WS-RX TC Co-chair
VP, Apache Synapse
Office: +44 844 484 8143
Cell: +44 798 447 4618
blog: http://pzf.fremantle.org
[EMAIL PROTECTED]
"Oxygenating the Web Service Platform", www.wso2.com
_______________________________________________
Esb-java-user mailing list
[email protected]
http://mailman.wso2.org/cgi-bin/mailman/listinfo/esb-java-user
_______________________________________________
Esb-java-user mailing list
[email protected]
http://mailman.wso2.org/cgi-bin/mailman/listinfo/esb-java-user