Although this makes the life easier by eliminating the log4j.properties
modifications, still, one has to restart the server to see debug logs. It
would have been great to have a simple remote API to make these changes on
a running server.

BTW this is a useful improvement; but, you need to think about a better
name than "synapseDebug" to reflect the purpose of this setting. To me,
synapseDebug implies that the whole server will be in debug mode and can be
connected through an IDE.  What about more descriptive and generic name
like this   *-synapse.mediator.log.level.debug* that can be used to change
the log of the level of log mediator without limiting to debug only?

Thanks!

On Thu, Mar 5, 2020 at 2:06 PM shafreen anfar <anfar.shafr...@gmail.com>
wrote:

> Hi All,
>
> I am Shafreen and I've been working with Synapse for many years. With this
> mail I am sending a fix [1] to solve one of the issues I've been facing.
>
> At the moment, even though log-mediator has a category called DEBUG, there
> is no way to enable this category. Therefore, no logs are printed under
> this category. The only workaround we have for this problem is to enable
> debug logs for log-mediator class itself by configuring log4j.properties
> file. But I believe, this configuration is for people who implement
> log-mediator but not for synapse users.
>
> IMO, synapse users should be able to enable debug mode of the log-mediator
> without touching the log4j.properties file. As a solution, I have done a
> fix [1] in which synapse users can start the server as follows,
>
> sh synapse.sh -synapseDebug
>
> When the server is started with the above flag, all the logs of
> log-mediator under the category DEBUG is printed. For more information,
> please have a look at [1] and [2]. Also, please note that the provided fix
> is tested in both linux and windows.
>
> [1] https://github.com/apache/synapse/pull/24
> [2] https://issues.apache.org/jira/browse/SYNAPSE-1116
>
>

-- 
Sagara Gunathunga

Blog      - http://ssagara.blogspot.com
Web      - http://people.apache.org/~sagara/
LinkedIn - http://www.linkedin.com/in/ssagara

Reply via email to