daytonaio / daytona

The Open Source Dev Environment Manager.
https://daytona.io
Apache License 2.0
11.93k stars 857 forks source link

feat: add server log files selection #1345

Open lbrecic opened 1 week ago

lbrecic commented 1 week ago

Add server log files selection & list server logs command

Description

This PR introduces server log files selection for reading upon running daytona server logs command. This naturally follows #1304 since now there is log rotation files that user might want to read from. Log files included in selection follow instructions from lumberjack package where rotated log files are saved under <process_name>-<timestamp>.log or <process_name>-<timestamp>.zip if compression is enabled through log file configuration. (<process_name> in this case is daytona; main relevant log file daytona.log is also included in selection)

To avoid selection with non-interactive approach, user is able to specify a log file name using --file flag. In order to make this easier for user, this PR also introduces a daytona server logs list which outputs a list of log files from server.

Related Issue(s)

Closes #1343

Screenrecording

https://github.com/user-attachments/assets/882e69b9-3b56-46b4-8939-9c717fe0ef9b