* Batch mode (via `-b`) and execution times (via `-n`) must be explicitly specified for `dashboard`, otherwise batch script cannot terminate.
* Batch mode execution times (via `-n`) must be explicitly specified for `dashboard`, otherwise batch script cannot terminate.
* Commands such as `watch`/`tt`/`trace`/`monitor`/`stack` should include `-n` option to ensure the script can be able to quit.
* Also consider to use `async` (for example: `watch c.t.X test returnObj > &`) to put commands run at background and get the output from the log file, see more from [asynchronous job](async.md)
#### Step 2: Run the script
Use `-b` to turn on batch mode, and use `-f` to specify the script file. By default the result will be output to the standard output, but you can redirect the output to the file like this:
Use `-f` to specify the script file. By default the result will be output to the standard output, but you can redirect the output to the file like this:
```bash
./as.sh -b -f /var/tmp/test.as 56328 > test.out
./as.sh -f /var/tmp/test.as 56328 > test.out
```
Use `-c` also can specify the commands, like this:
<p>Create a <codeclass="docutils literal notranslate"><spanclass="pre">test.as</span></code> script suffixed with <codeclass="docutils literal notranslate"><spanclass="pre">as</span></code>. Here <codeclass="docutils literal notranslate"><spanclass="pre">as</span></code> is suggested for the suffix of the filename, but in fact any suffix is acceptable.</p>
<li><p>Batch mode (via <codeclass="docutils literal notranslate"><spanclass="pre">-b</span></code>) and execution times (via <codeclass="docutils literal notranslate"><spanclass="pre">-n</span></code>) must be explicitly specified for <codeclass="docutils literal notranslate"><spanclass="pre">dashboard</span></code>, otherwise batch script cannot terminate.</p></li>
<li><p>Batch mode execution times (via <codeclass="docutils literal notranslate"><spanclass="pre">-n</span></code>) must be explicitly specified for <codeclass="docutils literal notranslate"><spanclass="pre">dashboard</span></code>, otherwise batch script cannot terminate.</p></li>
<li><p>Commands such as <codeclass="docutils literal notranslate"><spanclass="pre">watch</span></code>/<codeclass="docutils literal notranslate"><spanclass="pre">tt</span></code>/<codeclass="docutils literal notranslate"><spanclass="pre">trace</span></code>/<codeclass="docutils literal notranslate"><spanclass="pre">monitor</span></code>/<codeclass="docutils literal notranslate"><spanclass="pre">stack</span></code> should include <codeclass="docutils literal notranslate"><spanclass="pre">-n</span></code> option to ensure the script can be able to quit.</p></li>
<li><p>Also consider to use <codeclass="docutils literal notranslate"><spanclass="pre">async</span></code> (for example: <codeclass="docutils literal notranslate"><spanclass="pre">watch</span><spanclass="pre">c.t.X</span><spanclass="pre">test</span><spanclass="pre">returnObj</span><spanclass="pre">></span><spanclass="pre">&</span></code>) to put commands run at background and get the output from the log file, see more from <aclass="reference internal"href="async.html"><spanclass="doc">asynchronous job</span></a></p></li>
</ul>
</div>
<divclass="section"id="step-2-run-the-script">
<h3>Step 2: Run the script<aclass="headerlink"href="#step-2-run-the-script"title="Permalink to this headline">¶</a></h3>
<p>Use <codeclass="docutils literal notranslate"><spanclass="pre">-b</span></code> to turn on batch mode, and use <codeclass="docutils literal notranslate"><spanclass="pre">-f</span></code> to specify the script file. By default the result will be output to the standard output, but you can redirect the output to the file like this:</p>
<p>Use <codeclass="docutils literal notranslate"><spanclass="pre">-f</span></code> to specify the script file. By default the result will be output to the standard output, but you can redirect the output to the file like this:</p>
<liclass="toctree-l4"><aclass="reference internal"href="#view-logger-information-for-the-special-name">View logger information for the special name</a></li>
<liclass="toctree-l4"><aclass="reference internal"href="#view-logger-information-for-the-special-classloader">View logger information for the special classloader</a></li>
<liclass="toctree-l4"><aclass="reference internal"href="#view-the-logger-information-without-appenders">View the logger information without appenders</a></li>
</ul>
</li>
@ -339,6 +340,13 @@
update logger level success.</pre></div>
</div>
</div>
<divclass="section"id="classloader-logger-level">
<h3>指定classloader更新 logger level<aclass="headerlink"href="#classloader-logger-level"title="Permalink to this headline">¶</a></h3>
<h3>View the logger information without appenders<aclass="headerlink"href="#view-the-logger-information-without-appenders"title="Permalink to this headline">¶</a></h3>
<p>By default, the <codeclass="docutils literal notranslate"><spanclass="pre">logger</span></code> command only prints information about the logger with appenders. If you want to see information about loggers without <codeclass="docutils literal notranslate"><spanclass="pre">appender</span></code>, you can use the parameter <codeclass="docutils literal notranslate"><spanclass="pre">--include-no-appender</span></code>.</p>