[GH-ISSUE #4237] [Feature Request] 客户端日志增加日志类型,只有一个日志文件 #3338

Closed
opened 2026-05-05 14:09:14 -06:00 by gitea-mirror · 1 comment
Owner

Originally created by @zzbamboo on GitHub (May 23, 2024).
Original GitHub issue: https://github.com/fatedier/frp/issues/4237

Describe the feature request

我想在frpc中的日志模块新增一个日志类型,新的日志类型的主要特点是只有一个日志文件,而不是像之前那样按天分割日志。
在只有一个日志文件时,可以设置日志文件的文件大小最大值,当超过最大值时,清空最早一部分日志。
也可以单文件,按天清空一部分日志。
日志配置可如下所示
LogConfig
logType string "日志类型,当日志类型为空或者没写时,为原始日志类型。当为 singleFileSize时为单文件按文件大小清空,当为singleFileDay时为单文件按天清空"
maxFileSize string "最大日志文件大小,例如1KB, 1MB等等,在日志类型为 singleFileSize才生效。当文件大小超过最大值时,开始删除一部分日志文件"
removeFileSize string "当日志文件超过最大日志文件大小时,需要删除最前面多少文件,例如1KB, 1MB,在日志类型为 singleFileSize才生效。"

如果作者没有时间做,本人实现了上述需求并且通过所以测试后,可否pull request?

Describe alternatives you've considered

No response

Affected area

  • Docs
  • Installation
  • Performance and Scalability
  • Security
  • User Experience
  • Test and Release
  • Developer Infrastructure
  • Client Plugin
  • Server Plugin
  • Extensions
  • Others
Originally created by @zzbamboo on GitHub (May 23, 2024). Original GitHub issue: https://github.com/fatedier/frp/issues/4237 ### Describe the feature request 我想在frpc中的日志模块新增一个日志类型,新的日志类型的主要特点是只有一个日志文件,而不是像之前那样按天分割日志。 在只有一个日志文件时,可以设置日志文件的文件大小最大值,当超过最大值时,清空最早一部分日志。 也可以单文件,按天清空一部分日志。 日志配置可如下所示 LogConfig logType string "日志类型,当日志类型为空或者没写时,为原始日志类型。当为 singleFileSize时为单文件按文件大小清空,当为singleFileDay时为单文件按天清空" maxFileSize string "最大日志文件大小,例如1KB, 1MB等等,在日志类型为 singleFileSize才生效。当文件大小超过最大值时,开始删除一部分日志文件" removeFileSize string "当日志文件超过最大日志文件大小时,需要删除最前面多少文件,例如1KB, 1MB,在日志类型为 singleFileSize才生效。" 如果作者没有时间做,本人实现了上述需求并且通过所以测试后,可否pull request? ### Describe alternatives you've considered _No response_ ### Affected area - [X] Docs - [ ] Installation - [ ] Performance and Scalability - [ ] Security - [ ] User Experience - [ ] Test and Release - [ ] Developer Infrastructure - [ ] Client Plugin - [ ] Server Plugin - [ ] Extensions - [X] Others
Author
Owner

@fatedier commented on GitHub (May 23, 2024):

类似的需求可以将标准输出重定向到文件之后由你自己编写的工具来管理,这个项目不会考虑支持这样的功能。

<!-- gh-comment-id:2126674536 --> @fatedier commented on GitHub (May 23, 2024): 类似的需求可以将标准输出重定向到文件之后由你自己编写的工具来管理,这个项目不会考虑支持这样的功能。
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/frp#3338
No description provided.