Update file.md (#164)

This commit is contained in:
ethfoo 2023-05-11 19:42:30 +08:00 committed by GitHub
parent 81c58597c3
commit 78a9bfedc9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 3 deletions

View File

@ -308,6 +308,7 @@ state含义解释
| ------- | ------ | ----------------------------- | -------- | ------------------------------------------------------------ |
| pattern | string | 当multi.active=true的时候必填 | false | 判断为一条全新日志的正则表达式。例如配置为`'^\['`,则认为行首以`[`开头才是一条新日志,否则将这行内容合入上一条日志作为上一条日志的一部分 |
!!! example
假设有多行日志如下所示:
@ -317,18 +318,18 @@ state含义解释
at com.example.MyClass.myMethod(MyClass.java:25)
at com.example.MyClass.main(MyClass.java:10)
```
配置pattern正则^\d{4}-\d{2}-\d{2}
会将日志变成一行。这样在日志查询的时候,不会产生上面的多行异常日志堆栈乱序等问题。
#### maxLines
### maxLines
| `字段` | `类型` | `是否必填` | `默认值` | `含义` |
| -------- | ------ | ---------- | -------- | ------------------------------------------------------------ |
| maxLines | int | 非必填 | 500 | 1条日志最多包含几行内容。默认500行超过上限将强制发送当前日志超出部分作为新的一条日志 |
#### maxBytes
### maxBytes
| `字段` | `类型` | `是否必填` | `默认值` | `含义` |
| -------- | ------ | ---------- | -------- | ------------------------------------------------------------ |