<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">

<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>

                                <td>

                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="https://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>

                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px;  -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
    AS7 Logging
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="https://community.jboss.org/people/maxdib">maxdib</a> in <i>JBoss AS 7 Development</i> - <a href="https://community.jboss.org/message/732657#732657">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>Hi All,</p><p>I know the AS7 logging issue has been discussed at length in this forum. But even after following the recommendations provided by the experts i am faced with the same issue where the application logs are still going to the server.log of AS7.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>i have two spring applications (2 war files) deployed in a single JBOSS AS7 instance running in standalone mode.</p><p>And i have changed the jboss-deployment-structure.xml as below</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><strong>&lt;jboss-deployment-structure&gt;</strong></p><p><strong>&lt;!--&lt;ear-subdeployments-isolated&gt;false&lt;/ear-subdeployments-isolated&gt;--&gt;</strong></p><p><strong>&#160;&#160; &lt;deployment name="Test.war"&gt;</strong></p><p><strong>&#160;&#160;&#160; &lt;exclusions &gt;</strong></p><p><strong>&#160;&#160;&#160;&#160;&#160;&#160; &lt;module name="org.apache.log4j" /&gt;</strong></p><p><strong>&#160;&#160;&#160; &lt;/exclusions&gt;</strong></p><p><strong>&#160;&#160; &lt;/deployment&gt;</strong></p><p><strong>&lt;/jboss-deployment-structure&gt;</strong></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>for both the applications. </p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Also, i have put the log4j.properties of both the application war files in the their respective /WEB-INF/lib directory (as suggested in various other posts).</p><p>The contents of my log4j.properties file is as below: Similar configuration of log4j.properties for the other application. </p><p>But, when I start up the application both the application logs are written to the jboss server.log <span> :( </span></p><p>------------------------------------------------------------------------------------------------------------------------------------------------</p><p>log4j.logger.com.test=DEBUG,logfile</p><p>log4j.logger.com.test.autopassj=DEBUG,autopasslogfile</p><p>log4j.appender.logfile=org.apache.log4j.RollingFileAppender</p><p>log4j.appender.logfile.File=../standalone/log/X.log</p><p>log4j.appender.logfile.MaxBackupIndex=20</p><p>log4j.appender.logfile.MaxFileSize=5MB</p><p>log4j.appender.logfile.Encoding=UTF-8</p><p>log4j.appender.logfile.layout.ConversionPattern=%d %p [%c: %M: %L] - %m%n</p><p>log4j.appender.logfile.layout=org.apache.log4j.PatternLayout</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p># Autopass Log</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>log4j.appender.autopasslogfile.MaxBackupIndex=5</p><p>log4j.appender.autopasslogfile.MaxFileSize=5MB</p><p>log4j.appender.autopasslogfile.Encoding=UTF-8</p><p>log4j.appender.autopasslogfile.File=../standalone/log/AppLog.log</p><p>log4j.appender.autopasslogfile.layout.ConversionPattern=%d %p [%c: %M: %L] - %m%n</p><p>log4j.appender.autopasslogfile.layout=org.apache.log4j.PatternLayout</p><p>log4j.appender.autopasslogfile=org.apache.log4j.RollingFileAppender</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p># Spring Framework Log</p><p>log4j.logger.org.springframework=INFO,springLogfile</p><p>log4j.appender.springLogfile.File=../standalone/log/SpringFramework.log</p><p>log4j.appender.springLogfile.MaxBackupIndex=20</p><p>log4j.appender.springLogfile.MaxFileSize=5MB</p><p>log4j.appender.springLogfile.Encoding=UTF-8</p><p>log4j.appender.springLogfile.layout.ConversionPattern=%d %p [%c] - %m%n</p><p>log4j.appender.springLogfile.layout=org.apache.log4j.PatternLayout</p><p>log4j.appender.springLogfile=org.apache.log4j.RollingFileAppender</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>------------------------------------------------------------------------------------------------------------------------------------------------</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Please any help in this direction will be really appreciated.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Thanks and Regards.</p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Reply to this message by <a href="https://community.jboss.org/message/732657#732657">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in JBoss AS 7 Development at <a href="https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2225">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>