mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 08:05:49 -06:00
[GH-ISSUE #4875] log配置是否仍然有效? #3846
Labels
No labels
In Progress
WIP
WaitingForInfo
bug
doc
duplicate
easy
enhancement
future
help wanted
invalid
lifecycle/stale
need-issue-template
need-usage-help
no plan
proposal
pull-request
question
todo
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/frp#3846
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @YXH-YXH on GitHub (Jul 9, 2025).
Original GitHub issue: https://github.com/fatedier/frp/issues/4875
Bug Description
我在frpc.toml配置文件中添加log相关的配置,但提示
cannot unmarshalfrpc Version
0.63.0
frps Version
0.63.0
System Architecture
windows/amd64
Configurations
serverAddr = "xx.xx.xx.xx"
serverPort = 7000
proxies
name = "ssh-server"
type = "tcp"
localIP = "127.0.0.1"
localPort = 22
remotePort = 6000
log
to = "D:\frp_lastest\frpc.log"
level = "debug"
maxDays = 3
Logs
json: cannot unmarshal string into Go value of type v1.ClientConfig
Steps to reproduce
...
Affected area
@xiaowen-king commented on GitHub (Jul 11, 2025):
参考最新版的配置方式,不是这样配置了,取消log,直接把下面配置参数写进配置文件即可
日志文件路径,最好使用绝对路径
log.to = "./frpc.log"
日志模式,trace(跟踪), debug(调试), info(信息), warn(警告), error(错误)
log.level = "info"
日志保留时长(单位:天)
log.maxDays = 3
是否禁用日志颜色,默认为false(否)
log.disablePrintColor = false
使用的时候记得把中文删掉,因为在github打井号被默认为标题
@YXH-YXH commented on GitHub (Jul 14, 2025):
我在网址https://gofrp.org/zh-cn/docs/reference/common/ 找到如下信息
[[log]],改为log.to = "xxx"仍然报错,目前有些怀疑是代码问题猜测和strict变量有关
4. 但对go不太熟悉,不清楚接下来应该如何处理
@xiaowen-king commented on GitHub (Jul 15, 2025):
这个是配置模板地址:https://github.com/fatedier/frp/blob/dev/conf/frps_full_example.toml
在github项目里面的conf文件夹里面
@YXH-YXH commented on GitHub (Jul 16, 2025):
我找到原因了,我理解错了toml文件的格式
A
B
如上A\B的log写法,A 是正确的,B会异常
详细的toml语法参考