feat: add DISABLE_TRACING env which useful save logs

chore/cli-prune-script
moonrailgun 5 months ago
parent ab7830999d
commit 55e4f38350

@ -16,4 +16,8 @@ if (config.feature.disableInfoLog === true) {
brokerConfig.logLevel = 'error';
}
if (config.feature.disableTracing === true) {
brokerConfig.tracing = undefined;
}
export default brokerConfig;

@ -67,6 +67,7 @@ export const config = {
disableFileCheck: checkEnvTrusty(process.env.DISABLE_FILE_CHECK),
disableLogger: checkEnvTrusty(process.env.DISABLE_LOGGER), // 是否关闭日志
disableInfoLog: checkEnvTrusty(process.env.DISABLE_INFO_LOG), // 是否关闭常规日志(仅保留错误日志)
disableTracing: checkEnvTrusty(process.env.DISABLE_TRACING), // 是否关闭链路追踪
disableUserRegister: checkEnvTrusty(process.env.DISABLE_USER_REGISTER), // 是否关闭用户注册功能
disableGuestLogin: checkEnvTrusty(process.env.DISABLE_GUEST_LOGIN), // 是否关闭用户游客登录功能
disableCreateGroup: checkEnvTrusty(process.env.DISABLE_CREATE_GROUP), // 是否禁用用户创建群组功能

@ -29,6 +29,7 @@ title: Environment Variable
| TIANJI_WEBSITE_ID | - | Tianji website id |
| DISABLE_MESSAGEPACK | - | Whether to disable using messagepack as [parser](https://socket.io/docs/v4/custom-parser/) for socketio in openapi, if "1" or "true" turn off this method |
| DISABLE_LOGGER | - | Whether to disable the log output, if "1" or "true" turn off the log on the fly |
| DISABLE_TRACING | - | Whether to disable the Tracing function (enabling it can save a lot of logs), if "1" or "true" turn off the log on the fly |
| DISABLE_USER_REGISTER | - | Whether to disable the user register, if "1" or "true" turn off this method |
| DISABLE_GUEST_LOGIN | - | Whether to disable the guest login, if "1" or "true" turn off this method |
| DISABLE_CREATE_GROUP | - | Whether to disable user create group, if "1" or "true" turn off this method |

@ -29,6 +29,7 @@ title: 环境变量
| TIANJI_WEBSITE_ID | - | Tianji 网站 id |
| DISABLE_MESSAGEPACK | - | 是否禁用 openapi 的 sockio 使用 messagepack 作为 [解析器](https://socket.io/zh-CN/docs/v4/custom-parser/), 如果为 "1" 或者 "true" 则禁用该功能 |
| DISABLE_LOGGER | - | 是否禁用日志输出, 如果为 "1" 或者 "true" 则在运行中关闭日志 |
| DISABLE_TRACING | - | 是否禁用Tracing功能(开启可以节约大量日志), 如果为 "1" 或者 "true" 则在运行中关闭日志 |
| DISABLE_USER_REGISTER | - | 是否关闭用户注册功能, 如果为 "1" 或者 "true" 则关闭该功能 |
| DISABLE_GUEST_LOGIN | - | 是否关闭用户游客登录功能, 如果为 "1" 或者 "true" 则关闭该功能 |
| DISABLE_CREATE_GROUP | - | 是否关闭用户创建群组功能, 如果为 "1" 或者 "true" 则关闭该功能 |

Loading…
Cancel
Save