Logging problem!!

hdhanoa.westernasset.com's picture
Hello, I have problems logging input & output of a proxy. Here are basic question about ESB logging 1) I am looking into wso2esb-3.0.0\repository\logs, is this is the right Location ? 2) There are wso2-esb-service.log and wso2-esb-trace.log files which file should log my message 3) Am I have to change the Log Level (from default...) 4) What is the best way to catch the response time and if this is more than n seconds then log it or alert the user (may be email) Here is my proxy definition. (I will appreciate your response ) <?xml version="1.0" encoding="UTF-8"?> <definitions xmlns="http://ws.apache.org/ns/synapse">     <registry provider="org.wso2.carbon.mediation.registry.WSO2Registry">         <parameter name="cachableDuration">0</parameter>     </registry>     <proxy name="EmployeeProxyRest" transports="https http" startOnLoad="true" trace="enable" statistics="enable">         <target >             <inSequence>                 <log level="full"/>                 <send>                     <endpoint name="devCalendarFailoverProxy">                         <failover>                             <endpoint name="endpoint_urn_uuid_82B148B4842E9B83CE515715571872844422078598">                                 <address uri="http://devwarch1/commons/services/rest/calendar/HolidayCalendar" format="get"/>                             </endpoint>                             <endpoint name="endpoint_22">                                 <address uri="http://devserver2/app/services/rest/method1" format="get"/>                             </endpoint>                         </failover>                     </endpoint>                 </send>                 <drop/>             </inSequence>             <outSequence>                 <log level="full"/>                 <send/>             </outSequence>         </target>     </proxy>          <sequence name="fault">         <log level="full">             <property name="MESSAGE" value="Executing default 'fault' sequence"/>             <property name="ERROR_CODE" expression="get-property('ERROR_CODE')"/>             <property name="ERROR_MESSAGE" expression="get-property('ERROR_MESSAGE')"/>         </log>         <drop/>     </sequence>     <sequence name="main">         <in>             <log level="full"/>             <filter source="get-property('To')" regex="http://localhost:9000.*">                 <send/>             </filter>         </in>         <out>             <log level="full"/>             <send/>         </out>     </sequence>  
indika's picture

1) I am looking into

1) I am looking into wso2esb-3.0.0\repository\logs, is this is the right Location ? Yes 2) There are wso2-esb-service.log and wso2-esb-trace.log files which file should log my message You should use - wso2-esb.log .... wso2-esb-trace.log is for logging the trace messages if you have enabled the tracing in sequence,proxy service , etc. wso2-esb-service.log is for collecting service specific logs - e.g a proxy service 3) Am I have to change the Log Level (from default...) No, ... but please check ... log4j.category.org.apache.synapse=INFO 4) What is the best way to catch the response time and if this is more than n seconds then log it or alert the user (may be email) Here is my proxy definition. WSO2 BAM should be the best option as it can monitor the ESB . But, I do not know , with BAM, whether it is possible to register for stats events, notification with emails,etc... If you are expecting to do this with the ESB , you have to write a custom mediator/mediators. You can use ESB's capability of logging message , sending emails ,etc .. Thanks Indika
hdhanoa.westernasset.com's picture

Thanks indika!! I really

Thanks indika!! I really appreciate your response. I still has some questions... 1 )I check the log setting and it is log4j.category.org.apache.synapse=INFO. but still can not see any message input and output in the Log file . please take a look into my xml , is anything wrong there. I guess log tag should do all the magic :) 2) sometime I notice when i restart my ESB , my new developed service disappear 3) Also it created lot of temp folders like repository\conf\__tmp1278106716865
indika's picture

Hi <log level="full"/> is

Hi <log level="full"/> is correct. I am not getting temp folders like 'repository\conf\__tmp1278106716865'. All tmp files should be in 'wso2esb-3.0.0\tmp'. Have u changed bat/sh scripts of ESB? Have u set the CARBON_HOME as global environment variable? Thanks Indika  
hdhanoa.westernasset.com's picture

In ESB installation

In ESB installation guide http://wso2.org/project/esb/java/3.0.0/docs/installation_guide.html I could not find the docs that says I have to setup the CARBON_HOME variable, may be that is why i am getting these weired behavior (disappearance of services after restart etc..) Please let me know if I have to setup any other variables or options at installation. I am going to install this on our QA Environment, wish me luck :) (no disappearance of the services...) Thanks Again!!
library project main code
Learn Cloud
Learn
Cloud

The WSO2 Application Server is a reliable application server that can host your enterprise web applications. The WSO2 Application Server as a Service is offered in StratosLive, the WSO2 Platform as a Service. This article explains how a simple web application can be developed and deployed from Carbon Studio to the WSO2 Application Server...

Latest Webinar
KeellsSuper is a leading supermarket chain with 50-plus outlets in Sri Lanka, and it offers the only online supermarket in the country. In 2005, JKH implemented SAP ERP across it’s 70 subsidiaries...
Thursday, February 16th 2012, 09.00 AM (PST)

Thursday, February 16th 2012, 10.00 AM (GMT)