[ 
https://issues.apache.org/jira/browse/SMX4-1002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13166187#comment-13166187
 ] 

metatech commented on SMX4-1002:
--------------------------------

Tip: using one log file per service can easily be enabled with the following 
snippet in Spring XML :
{code:xml}
        <bean 
class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
                <property name="targetClass">
                        <value>org.slf4j.MDC</value>
                </property>
                <property name="targetMethod">
                        <value>put</value>
                </property>
                <property name="arguments">
                        <list>
                                <value>service</value>
                                <value>nameOfTheFileToUseForLog</value>
                        </list>
                </property>
        </bean>
{code}
and configure in org.ops4j.pax.logging.cfg :
{code:xml}
log4j.appender.sift.key=service
{code}

                
> Use SLF4J instead of Java standard logging for CXF in SMX
> ---------------------------------------------------------
>
>                 Key: SMX4-1002
>                 URL: https://issues.apache.org/jira/browse/SMX4-1002
>             Project: ServiceMix 4
>          Issue Type: Improvement
>          Components: Bundles
>    Affects Versions: 4.3.0
>         Environment: ServiceMix 4.3
>            Reporter: metatech
>            Assignee: Freeman Fang
>            Priority: Trivial
>             Fix For: 4.4.0
>
>   Original Estimate: 0.5h
>  Remaining Estimate: 0.5h
>
> CXF uses by default the default Java logging framework (java.util.logging).
> This framework does not support MDC (Mapped Diagnostic Context).
> If the MDCSiftingAppender is used to have separate files for each route,
> all CXF logs end up in the default file.
> Solution : add the following line : 
> org.apache.cxf.Logger=org.apache.cxf.common.logging.Slf4jLogger
> in the file
> $SERVICEMIX_HOME/etc/system.properties
> I propose to make it the default value in the ServiceMix distribution, if 
> nobody sees any down-sides.
> http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/assemblies/shared/src/main/resources/etc/system.properties
> Thanks.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to