Prettified Code!

This commit is contained in:
hengyunabc
2026-01-09 15:28:07 +00:00
committed by GitHub Action
parent 27c2c93597
commit 1564a47044
3 changed files with 25 additions and 24 deletions
+15 -14
View File
@@ -6,20 +6,21 @@
全局开关
:::
| 名称 | 默认值 | 描述 |
| 名称 | 默认值 | 描述 |
| ---------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| unsafe | false | 是否支持对系统级别的类进行增强,打开该开关可能导致把 JVM 搞挂,请慎重选择! |
| dump | false | 是否支持被增强了的类 dump 到外部文件中,如果打开开关,class 文件会被 dump 到`/${application working dir}/arthas-class-dump/`目录下,具体位置详见控制台输出 |
| batch-re-transform | true | 是否支持批量对匹配到的类执行 retransform 操作 |
| json-format | false | 是否支持 json 化的输出 |
| disable-sub-class | false | 是否禁用子类匹配,默认在匹配目标类的时候会默认匹配到其子类,如果想精确匹配,可以关闭此开关 |
| support-default-method | true | 是否支持匹配到 default method, 默认会查找 interface,匹配里面的 default method。参考 [#1105](https://github.com/alibaba/arthas/issues/1105) |
| save-result | false | 是否打开执行结果存日志功能,打开之后所有命令的运行结果都将保存到`~/logs/arthas-cache/result.log`中 |
| job-timeout | 1d | 异步后台任务的默认超时时间,超过这个时间,任务自动停止;比如设置 1d, 2h, 3m, 25s,分别代表天、小时、分、秒 |
| print-parent-fields | true | 是否打印在 parent class 里的 filed |
| verbose | false | 是否打印更多详细信息 |
| strict | true | 是否启用 strict 模式 |
| el | ognl | 表达式语言,是否切换使用表达式ognl/qlexpress开关 |
| unsafe | false | 是否支持对系统级别的类进行增强,打开该开关可能导致把 JVM 搞挂,请慎重选择! |
| dump | false | 是否支持被增强了的类 dump 到外部文件中,如果打开开关,class 文件会被 dump 到`/${application working dir}/arthas-class-dump/`目录下,具体位置详见控制台输出 |
| batch-re-transform | true | 是否支持批量对匹配到的类执行 retransform 操作 |
| json-format | false | 是否支持 json 化的输出 |
| disable-sub-class | false | 是否禁用子类匹配,默认在匹配目标类的时候会默认匹配到其子类,如果想精确匹配,可以关闭此开关 |
| support-default-method | true | 是否支持匹配到 default method, 默认会查找 interface,匹配里面的 default method。参考 [#1105](https://github.com/alibaba/arthas/issues/1105) |
| save-result | false | 是否打开执行结果存日志功能,打开之后所有命令的运行结果都将保存到`~/logs/arthas-cache/result.log`中 |
| job-timeout | 1d | 异步后台任务的默认超时时间,超过这个时间,任务自动停止;比如设置 1d, 2h, 3m, 25s,分别代表天、小时、分、秒 |
| print-parent-fields | true | 是否打印在 parent class 里的 filed |
| verbose | false | 是否打印更多详细信息 |
| strict | true | 是否启用 strict 模式 |
| el | ognl | 表达式语言,是否切换使用表达式ognl/qlexpress开关 |
## 查看所有的 options
```bash
@@ -62,7 +63,7 @@ $ options
n e ed to set object properties. Want to set o
bject properties, execute `options strict
false`
1 String el ognl expression language Option to use ognl/qlexpress in commands,
1 String el ognl expression language Option to use ognl/qlexpress in commands,
express default ognl, can change to qlexpress.
```
+7 -8
View File
@@ -8,12 +8,12 @@
## 参数说明
| 参数名称 | 参数说明 |
|-----------------------:| :--------------------------------------------------------------- |
| _express_ | 执行的表达式 |
| `[c:]` | 执行表达式的 ClassLoader 的 hashcode,默认值是 SystemClassLoader |
| `[classLoaderClass:]` | 指定执行表达式的 ClassLoader 的 class name |
| `[x]` | 结果对象的展开层次,默认值 1 |
| 参数名称 | 参数说明 |
| --------------------: | :--------------------------------------------------------------- |
| _express_ | 执行的表达式 |
| `[c:]` | 执行表达式的 ClassLoader 的 hashcode,默认值是 SystemClassLoader |
| `[classLoaderClass:]` | 指定执行表达式的 ClassLoader 的 class name |
| `[x]` | 结果对象的展开层次,默认值 1 |
## 使用参考
@@ -38,7 +38,6 @@ $ qlexpress 'com.taobao.arthas.core.GlobalOptions.isDump'
$ qlexpress 'import com.alibaba.qlexpress4.QLImportTester; QLImportTester.add(1,2);'
```
通过 hashcode 指定 ClassLoader:
```bash
@@ -69,4 +68,4 @@ $ qlexpress --classLoaderClass org.springframework.boot.loader.LaunchedURLClassL
name=@String[org.springframework.boot.SpringApplication],
logger=@Logger[Logger[org.springframework.boot.SpringApplication]],
]
```
```
+3 -2
View File
@@ -7,7 +7,7 @@ Global options
:::
| Name | Default Value | Description |
|------------------------| ------------- |-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ---------------------- | ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| unsafe | false | whether to enhance to system-level class. Use it with caution since JVM may hang |
| dump | false | whether to dump enhanced class to the external files. If it's on, enhanced class will be dumped into `/${application dir}/arthas-class-dump/`, the specific output path will be output in the console |
| batch-re-transform | true | whether to re-transform matched classes in batch |
@@ -20,6 +20,7 @@ Global options
| verbose | false | This option enables print verbose information |
| strict | true | whether to enable strict mode |
| el | ognl | Option to use ognl/qlexpress in commands, default ognl, can change to qlexpress |
## View all options
```bash
@@ -62,7 +63,7 @@ $ options
n e ed to set object properties. Want to set o
bject properties, execute `options strict
false`
1 String el ognl expression language Option to use ognl/qlexpress in commands,
1 String el ognl expression language Option to use ognl/qlexpress in commands,
express default ognl, can change to qlexpress.
```