rustdesk / rustdesk/rustdesk-server
Log to file
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 10.4k
- Forks
- 2.6k
- PR merge metrics
- No merged PRs in 30d
Description
BACKGROUND
Rustdesk seems to log to stdout only, and thus to docker's built-in "json driver". The logs can be access like so:
$ docker logs -t $CONTAINER_NAMEsudo tail -f /var/lib/docker/containers/$CONTAINER_ID/$CONTAINER_ID-json.log
PROBLEM
When the container is recycled, the logs are lost. The workaround is to use another logging tool, but that is unnecessary complexity, especially for small deployments.
Also, in general, the logs are not in a friendly format - it's much simpler, especially in small deployments, to simply have the log in a file that can be easily manipulated. Not everyone uses large complex logging apps and servers, etc.
SOLUTION
Many apps have an option to log to file as well. It would be nice if the log could be sent to a file instead of (or in addition to) stdout. If enabled, it could be written to /var/lib/rustdesk/app.log by default.
Personally, I would mount it as /var/log/rustdesk.log:/var/log/rustdesk.log so that I could have it on the host, use logrotate on it, add it to backups etc.
ALTERNATIVES
An unnecessarily complicated environment that includes log aggregation and monitoring, and who knows what else. For small servers that is overkill and hard to manage.
Additional context
Thank you for considering it!
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No file, test, or entry point is named in the issue. Start by tracing how the Rust server configures stdout logging and inspect existing configuration conventions; done means supporting file logging, optionally alongside stdout, with a configurable path suitable for rotation and container deployments.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- observability-sre
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100