Fix/rolling logger#1105
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes the logger/rolling sample so it actually writes logs to logs.log by explicitly enabling the file appender, and adjusts sample output pacing to match the other logger examples.
Changes:
- Add
appender: filetologger/rolling/conf/dubbogo.ymlso file output is enabled. - Slow down the rolling sample’s log loop with a 1s sleep per iteration.
- Update
logger/README.mdandlogger/README_zh.mdto document the need forappender: fileand clarify log file location.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| logger/rolling/conf/dubbogo.yml | Enables file appender so the rolling sample creates logs.log. |
| logger/rolling/cmd/main.go | Adds a 1s delay per loop to make sample output behavior more readable/consistent. |
| logger/README.md | Documents appender: file and log file location (needs clarification on config root key). |
| logger/README_zh.md | Same as above for the Chinese README (needs clarification on config root key). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
AlexStocks
approved these changes
May 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
变更内容
修复
logger/rolling样例运行后未生成logs.log的问题。主要修改:
在
logger/rolling/conf/dubbogo.yml中增加appender: fileappender是consolelogger.file不会自动启用文件输出appender: file后,日志会写入logs.log调整
logger/rolling/cmd/main.go的日志输出频率time.Sleep(time.Second * 1)更新
logger/README.md和logger/README_zh.mdappender: filelogger/rolling目录运行时,logs.log会生成在logger/rolling/logs.logappender: console,file验证方式
在 PowerShell 中执行:
issue #1075