Skylm808 opened a new issue, #1075:
URL: https://github.com/apache/dubbo-go-samples/issues/1075

   # logger/rolling 样例未生成预期的 logs.log 文件
   
   ## 问题描述
   
   `dubbo-go-samples/logger` 中:
   
   - `default`:通过
   - `level`:通过
   - `custom`:通过
   - `rolling`:未通过
   
   当前唯一有问题的是 `rolling` 这个“输出到文件”的样例。
   
   ## 复现方式
   
   按 README 和代码注释中的方式执行:
   
   ```bash
   cd logger/rolling
   export DUBBO_GO_CONFIG_PATH=./conf/dubbogo.yml
   go run ./cmd/main.go
   ```
   
   ## 配置内容
   
   `logger/rolling/conf/dubbogo.yml` 中配置为:
   
   ```yaml
   dubbo:
     protocols:
       triple:
         name: tri
         port: 20000
     logger:
       file:
         name: logs.log
         max-size: 1
         max-age: 3
         max-backups: 5
         compress: false
   ```
   
   ## 实际结果
   
   程序运行后控制台持续打印日志,但没有观察到预期的 `logs.log` 文件。
   
   检查命令:
   
   ```bash
   find dubbo-go-samples -name 'logs.log' -o -name 'logs.log.*'
   ```
   
   结果为空,没有找到任何 `logs.log`。
   
   ## 预期结果
   
   按 README 中 `rolling: output to file` 的描述,运行后应至少生成配置中的日志文件:
   
   ```text
   logs.log
   ```
   
   ## 补充说明
   
   当前项目文档没有明确说明:
   
   - `logs.log` 应生成在哪个目录
   - 是否应同时输出到控制台
   
   但按照现有配置,至少应该能观察到 `logs.log` 文件落盘。
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to