From 9894a080ab934961ce299fb56940ea421e5ee247 Mon Sep 17 00:00:00 2001 From: jaronnie Date: Mon, 22 Apr 2024 13:56:13 +0800 Subject: [PATCH] feat(jzero): update docs --- config.toml | 2 +- docs/src/guide/config/limit.md | 2 +- docs/src/guide/config/log.md | 36 +++++++++++++++++++++++++++++++++ docs/src/guide/config/logger.md | 9 --------- 4 files changed, 38 insertions(+), 11 deletions(-) create mode 100644 docs/src/guide/config/log.md delete mode 100644 docs/src/guide/config/logger.md diff --git a/config.toml b/config.toml index 787fd413..a6969ec2 100644 --- a/config.toml +++ b/config.toml @@ -5,7 +5,7 @@ Mode = "dev" Name = "jzero.rpc" [Jzero] -ListenOnUnixSocket = "./jzero.sock" + ListenOnUnixSocket = "./jzero.sock" [Log] ServiceName = "jzero" diff --git a/docs/src/guide/config/limit.md b/docs/src/guide/config/limit.md index d5c718b4..d73ed594 100644 --- a/docs/src/guide/config/limit.md +++ b/docs/src/guide/config/limit.md @@ -15,7 +15,7 @@ tag: MaxConns = 100 # 替换成自己的 App 名称 -[Jzero] +[App1] GrpcMaxConns = 100 ``` diff --git a/docs/src/guide/config/log.md b/docs/src/guide/config/log.md new file mode 100644 index 00000000..3f9f7ff6 --- /dev/null +++ b/docs/src/guide/config/log.md @@ -0,0 +1,36 @@ +--- +title: 日志配置 +icon: gears +star: true +order: 1 +category: 配置 +tag: + - Guide +--- + +::: tip jzero version > v0.8.0 支持在日志模式为 file 或者 volume 的情况下仍然输出到控制台 +默认 LogToConsole 值为 true. 如果需要关闭, 可以设置为 false. +::: + +```toml +[Log] +ServiceName = "app1" +Level = "info" +Mode = "file" +encoding = "plain" +KeepDays = 30 +MaxBackups = 7 +MaxSize = 50 +Rotation = "size" + +[App1] +LogToConsole = true +``` + +默认配置下日志最大占用空间: 2G + +计算规则如下: + +logs 文件夹一共 5 个文件. 每个文件最大占用 50MB, 最多备份 7 个. 即 50MB * 8 * 5 + + diff --git a/docs/src/guide/config/logger.md b/docs/src/guide/config/logger.md deleted file mode 100644 index e637f375..00000000 --- a/docs/src/guide/config/logger.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -title: 日志配置 -icon: gears -star: true -order: 1 -category: 配置 -tag: - - Guide ---- \ No newline at end of file