How to generate server.log in custom folder location in wildfly-8.2.0.Final
<p>I am facing a problem regarding <strong><em>server.log</em></strong> file generation in <strong>Wildfly-8.2.0.Final</strong> AS. </p>

<p>Below is the <code>size-rotating-file-handler</code> definition used in logging subsystem <code>&lt;subsystem xmlns="urn:jboss:domain:logging:2.0"&gt;</code> of <strong>standalone-full-ha.xml</strong>.</p>

<pre><code>&lt;size-rotating-file-handler name="FILE" autoflush="false"&gt;
      &lt;level name="DEBUG"/&gt;
      &lt;file relative-to="jboss.server.log.dir" path="server.log"/&gt;
      &lt;rotate-size value="500k"/&gt;
      &lt;max-backup-index value="5"/&gt;
      &lt;append value="true"/&gt;
&lt;/size-rotating-file-handler&gt;
</code></pre>

<p>The above works fine and it generates <strong><em>server.log</em></strong> in <strong>${WILDFLY_HOME}/standalone/log</strong> folder. I would like to have a custom location for <strong><em>server.log</em></strong> and hence, modified the <strong>path</strong> attribute to contain the complete custom path and removed <strong>relative-to</strong> attribute as shown below.</p>

<pre><code>&lt;file path="D:/wildfly-8.2.0.Final/standalone/log/server.log"/&gt;
</code></pre>

<p>But, with the above changes, <strong><em>server.log</em></strong> is getting generated in custom location but facing the below problems:</p>

<ul>
<li><p>log statements are getting generated without date in it. for e.g.:</p>

<p>12:16:11,800 INFO  [org.jboss.as] (MSC service thread 1-7) JBAS015899: WildFly 8.2.0.Final "Tweek" starting</p></li>
<li><p>Complete logs are not observed in the log file and for example, "server is started..." will be the last line and a quarter of the log statements are not printed.</p></li>
</ul>

<p>Please help me.</p>

<p>Edited on 10/May/2016: added the below configuration.</p>

<pre><code>&lt;subsystem xmlns="urn:jboss:domain:logging:2.0"&gt;
        &lt;add-logging-api-dependencies value="false"/&gt;
        &lt;use-deployment-logging-config value="true"/&gt;
        &lt;console-handler name="CONSOLE"&gt;
            &lt;level name="INFO"/&gt;
            &lt;formatter&gt;
                &lt;named-formatter name="PATTERN"/&gt;
            &lt;/formatter&gt;
        &lt;/console-handler&gt;
        &lt;size-rotating-file-handler name="FILE" autoflush="false"&gt;
            &lt;level name="DEBUG"/&gt;
            &lt;file path="${custom.path}/server.log"/&gt;
            &lt;rotate-size value="500k"/&gt;
            &lt;max-backup-index value="5"/&gt;
            &lt;append value="false"/&gt;
            &lt;formatter&gt;
                &lt;named-formatter name="PATTERN"/&gt;
            &lt;/formatter&gt;
        &lt;/size-rotating-file-handler&gt;
        &lt;logger category="com.arjuna"&gt;
            &lt;level name="WARN"/&gt;
        &lt;/logger&gt;
        &lt;logger category="org.apache.tomcat.util.modeler"&gt;
            &lt;level name="WARN"/&gt;
        &lt;/logger&gt;
        &lt;logger category="org.jboss.as.config"&gt;
            &lt;level name="DEBUG"/&gt;
        &lt;/logger&gt;
        &lt;logger category="sun.rmi"&gt;
            &lt;level name="WARN"/&gt;
        &lt;/logger&gt;
        &lt;logger category="jacorb"&gt;
            &lt;level name="WARN"/&gt;
        &lt;/logger&gt;
        &lt;logger category="jacorb.config"&gt;
            &lt;level name="ERROR"/&gt;
        &lt;/logger&gt;
        &lt;root-logger&gt;
            &lt;level name="INFO"/&gt;
            &lt;handlers&gt;
                &lt;handler name="CONSOLE"/&gt;
                &lt;handler name="FILE"/&gt;
            &lt;/handlers&gt;
        &lt;/root-logger&gt;
        &lt;formatter name="PATTERN"&gt;
            &lt;pattern-formatter pattern="%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/&gt;
        &lt;/formatter&gt;
        &lt;formatter name="COLOR-PATTERN"&gt;
            &lt;pattern-formatter pattern="%K{level}%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/&gt;
        &lt;/formatter&gt;
    &lt;/subsystem&gt;
</code></pre>