</code></pre><divclass="line-numbers"aria-hidden="true"><divclass="line-number"></div><divclass="line-number"></div><divclass="line-number"></div><divclass="line-number"></div><divclass="line-number"></div></div></div><p>If the message above is output on the console, then this behavior is enabled successfully.</p></li><li><p>Log file path</p><p>The command execution result will be save in <code>{user.home}/logs/arthas-cache/result.log</code>. Pls. clean it up regularly to save disk space.</p></li></ul><h3id="use-asynchronous-job-to-log"tabindex="-1"><aclass="header-anchor"href="#use-asynchronous-job-to-log"aria-hidden="true">#</a> Use asynchronous job to log</h3><divclass="language-bash ext-sh line-numbers-mode"><preclass="language-bash"><code>$ trace Test t <spanclass="token operator">>></span><spanclass="token operator">&</span>
</code></pre><divclass="line-numbers"aria-hidden="true"><divclass="line-number"></div><divclass="line-number"></div><divclass="line-number"></div></div></div><p>By doing this, the command will run at background asynchronously, and output the execution result into <code>~/logs/arthas-cache/{PID}/{JobId}</code>:</p><ul><li>The background job will continue to run even if the current session is disconnected. The default job timeout value is 1 day, use global '<ahref="/en/doc/options.html"class="">options</a>' command to alternate it.</li><li>The execution result will be output into the file asynchronously. Pls. note the behavior of this command is not controlled by <code>save-result</code> option from global <ahref="/en/doc/options.html"class="">options</a>. No matter <code>save-result</code> is set to <code>true</code> or not, this command will write into <code>~/logs/arthas-cache/{PID}/{JobId}</code> anyway, instead of into <code>~/logs/arthas-cache/result.log</code>.</li></ul></div><!--[--><!--]--></div><footerclass="page-meta"data-v-e0e60120><divclass="meta-item edit-link"><aclass="external-link meta-item-label"href="https://github.com/alibaba/arthas/edit/master/site/docs/en/doc/save-log.md"rel="noopener noreferrer"target="_blank"aria-label="Edit this page on GitHub"><!--[--><!--]--><span>Edit this page on GitHub</span><span><svgclass="external-link-icon"xmlns="http://www.w3.org/2000/svg"aria-hidden="true"focusable="false"x="0px"y="0px"viewbox="0 0 100 100"width="15"height="15"><pathfill="currentColor"d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygonfill="currentColor"points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><spanclass="external-link-icon-sr-only">open in new window</span></span><!--[--><!--]--></a></div><divclass="meta-item last-updated"><spanclass="meta-item-label">Last Updated: </span><!----></div><divclass="meta-item contributors"><spanclass="meta-item-label">Contributors: </span><spanclass="meta-item-info"><!--[--><!--[--><spanclass="contributor"title="email: hengyunabc@gmail.com">hengyunabc</span><!--[-->, <!--]--><!--]--><!--[--><spanclass="contributor"title="email: LHearen@126.com">Hearen</span><!--[-->, <!--]--><!--]--><!--[--><spanclass="contributor"title="email: hollowman186@vip.qq.com">Hollow Man</span><!--[-->, <!--]--><!--]--><!--[--><spanclass="contributor"title="email: ian.luo@gmail.com">beiwei30</span><!----><!--]--><!--]--></span></div></footer><navclass="page-nav"data-v-e0e60120><pclass="inner"><spanclass="prev"><ahref="/en/doc/async.html"class=""aria-label="Arthas Async Jobs"><!--[--><!--]--> Arthas Async Jobs <!--[--><!--]--></a></span><spanclass="next"><ahref="/en/doc/batch-support.html"class=""aria-label="Batch Processing"><!--[--><!--]--> Batch Processing <!--[--><!--]--></a></span></p></nav><!--[--><!--]--></main><!--]--></div><!----><!--]--></div>