Skip to content

Commit 721466d

Browse files
committed
docs: remove logger.setTitle because it has been deprecated
1 parent 78705bc commit 721466d

File tree

2 files changed

+1
-47
lines changed

2 files changed

+1
-47
lines changed

docs/apis/ScriptAPI/Logger.md

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -115,30 +115,7 @@ The result of the log output is:
115115

116116
### Other Settings
117117

118-
In addition, there are other settings to change the format of the output log
119-
120-
#### Set custom log message headers
121-
122-
`logger.setTitle(title)`
123-
124-
- Parameter:
125-
- title : `String`
126-
Set custom headers
127-
- Return value: none
128-
129-
"Header" is the text at the beginning of the log output entry, which is used to visually distinguish the output source of the log.
130-
By default, message headers are empty by default, i.e. output without headers.
131-
132-
For example: set a custom header as `logger.setTitle("LeviLamina")`
133-
Then the following log output will become like:
134-
135-
```log
136-
20:05:26 ERROR [LeviLamina] Fail to transport the player
137-
```
138-
139-
If you want to turn off the header after setting it, do `logger.setTitle("")`
140-
141-
118+
In addition, there are other settings to change the format of the output log
142119

143120
#### Unified modification log output level
144121

docs/apis/ScriptAPI/Logger.zh.md

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -117,29 +117,6 @@
117117

118118
除此之外,还有其他的一些设置项,用来改变输出日志的格式
119119

120-
#### 设置自定义日志消息标头
121-
122-
`logger.setTitle(title)`
123-
124-
- 参数:
125-
- title : `String`
126-
设置的自定义标头
127-
- 返回值:无
128-
129-
「标头」为日志输出条目开头的文字,用来直观地区分日志的输出源。
130-
默认情况下,消息标头默认为空,即输出时没有标头。
131-
132-
例如:设置自定义标头为`logger.setTitle("LeviLamina")`
133-
则在接下来的日志输出将变为形如:
134-
135-
```log
136-
20:05:26 ERROR [LeviLamina] Fail to transport the player
137-
```
138-
139-
如果在设置之后想要关闭标头,请执行`logger.setTitle("")`
140-
141-
142-
143120
#### 统一修改日志输出等级
144121

145122
`logger.setLogLevel(level)`

0 commit comments

Comments
 (0)