mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 08:05:49 -06:00
[GH-ISSUE #3906] 如何设置日志保存到文件,并同时打印到标准输出 #3095
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#3095
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 @mapxn on GitHub (Dec 30, 2023).
Original GitHub issue: https://github.com/fatedier/frp/issues/3906
Describe the feature request
如何保存日志到文件,并同时打印到标准输出
使用0.53.2版本,frps使用如下yml配置,发现只能保存到文件里,标准输出为空
印象在旧版本中是可以的,是新版本我不会用吗?
Describe alternatives you've considered
No response
Affected area
@superzjg commented on GitHub (Dec 30, 2023):
一直都是分开的,你可以两种方式实现:
1、设置
log.to为文件,运行frp命令时,使用重定向 > 或 >>log.to定义的文件2、不设置
log.to为文件,而是console,运行frp命令时,重定向 > 或 >> 到某个文件@wuai1024 commented on GitHub (Dec 30, 2023):
我也想问这个,目前使用docker部署的,都只有文件能看到。
docker logs frpc 没有内容
@superzjg commented on GitHub (Dec 30, 2023):
我自己再说一点,openwrt 系统中 将 frp 以 procd方式启动/守护时,设置
procd_set_param stdout 1
procd_set_param stderr 1
设置后,标准输出和标准错误,并不会重定向到 syslog,这个问题确实存在。
procd 简介:https://openwrt.org/docs/guide-developer/procd-init-scripts#defining_service_instances
@mapxn commented on GitHub (Dec 30, 2023):
我也是发现使用最新版后,docker logs没有输出了(配置文件平滑迁移的)
@github-actions[bot] commented on GitHub (Jan 25, 2024):
Issues go stale after 21d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.