You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@synapse.apache.org by GitBox <gi...@apache.org> on 2020/03/04 15:35:07 UTC

[GitHub] [synapse] shafreenAnfar opened a new pull request #24: Add an improvement to log-mediator

shafreenAnfar opened a new pull request #24: Add an improvement to log-mediator
URL: https://github.com/apache/synapse/pull/24
 
 
   Consider the below Proxy service in which I have configured the log-mediator to print logs only when the category is set to DEBUG. However, there is no way to start the server with log-mediator debug logs enabled. 
   
   Only way to print the property values inside the log mediator is by configuring debug mode for the log -mediator class in the log4j.properties. But this is wrong because aforementioned configuration is there for the implementer of log-mediator but not for the synapse user.
   
   ```xml
    <proxy xmlns="http://ws.apache.org/ns/synapse"
          name="test"
          transports="http,https"
          statistics="disable"
          trace="disable"
          startOnLoad="true">
      <target>
         <inSequence>
            <log category="DEBUG">
               <property name="someproperty" value="somevalue"/>
            </log>
            <respond/>
         </inSequence>
      </target>
      <description/>
   </proxy>
   ```
   Above issue is fixed with this PR.
   
   With this fix synapse users can start the server as follows which will enable debug mood for log-mediator. 
   
   ```
   sh synapse.sh -synapseDebug
   ```
   
   Following is a sample output of the log mediator. 
   
   ```
   2020-03-04 21:01:02,663 [-] [PassThroughMessageProcessor-1]  INFO LogMediator To: /services/test, MessageID: urn:uuid:13cc5420-1282-456b-a0c0-fcfa6457c28e, Direction: request, someproperty = somevalue
   ```
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[GitHub] [synapse] shafreenAnfar commented on a change in pull request #24: Add an improvement to log-mediator

Posted by GitBox <gi...@apache.org>.
shafreenAnfar commented on a change in pull request #24: Add an improvement to log-mediator
URL: https://github.com/apache/synapse/pull/24#discussion_r388671630
 
 

 ##########
 File path: modules/distribution/src/main/bin/synapse.sh
 ##########
 @@ -146,12 +146,17 @@ if [ "$1" = "-xdebug" ]; then
     SERVER_NAME=$2
     shift 2 # -serverName and actual name
 
+  elif [ "$1" = "-synapseDebug" ]; then
+    SYNAPSE_DEBUG="synapseDebug"
+    shift
+
 elif [ "$1" = "-h" ]; then
     echo "Usage: synapse.sh ( commands ... )"
     echo "commands:"
     echo "  -xdebug            Start Synapse under JPDA debugger"
     echo "  -sample (number)   Start with sample Synapse configuration of given number"
     echo "  -serverName <name> Name of the Synapse server instance"
+    echo "  -synapseName       Start Synapse under debug mode"
 
 Review comment:
   Fixed it. Thanks for pointing out and sorry for the mistake.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[GitHub] [synapse] isudana merged pull request #24: Add an improvement to log-mediator

Posted by GitBox <gi...@apache.org>.
isudana merged pull request #24: Add an improvement to log-mediator
URL: https://github.com/apache/synapse/pull/24
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[GitHub] [synapse] isudana commented on a change in pull request #24: Add an improvement to log-mediator

Posted by GitBox <gi...@apache.org>.
isudana commented on a change in pull request #24: Add an improvement to log-mediator
URL: https://github.com/apache/synapse/pull/24#discussion_r388012618
 
 

 ##########
 File path: modules/distribution/src/main/bin/synapse.sh
 ##########
 @@ -146,12 +146,17 @@ if [ "$1" = "-xdebug" ]; then
     SERVER_NAME=$2
     shift 2 # -serverName and actual name
 
+  elif [ "$1" = "-synapseDebug" ]; then
+    SYNAPSE_DEBUG="synapseDebug"
+    shift
+
 elif [ "$1" = "-h" ]; then
     echo "Usage: synapse.sh ( commands ... )"
     echo "commands:"
     echo "  -xdebug            Start Synapse under JPDA debugger"
     echo "  -sample (number)   Start with sample Synapse configuration of given number"
     echo "  -serverName <name> Name of the Synapse server instance"
+    echo "  -synapseName       Start Synapse under debug mode"
 
 Review comment:
   this should be changed to -synapseDebug isn't it?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org