rustdesk / rustdesk-server

RustDesk Server Program

Home Page:https://rustdesk.com/server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Log to file

lonix1 opened this issue · comments

commented

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_NAME
  • sudo 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!