-
Notifications
You must be signed in to change notification settings - Fork 845
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add server log files selection #1345
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Luka Brecic <[email protected]>
Signed-off-by: Luka Brecic <[email protected]>
59490c6
to
0644b54
Compare
Signed-off-by: Luka Brecic <[email protected]>
Signed-off-by: Luka Brecic <[email protected]>
Signed-off-by: Luka Brecic <[email protected]>
Signed-off-by: Luka Brecic <[email protected]>
Signed-off-by: Luka Brecic <[email protected]>
Signed-off-by: Luka Brecic <[email protected]>
Signed-off-by: Luka Brecic <[email protected]>
Signed-off-by: Luka Brecic <[email protected]>
Signed-off-by: Luka Brecic <[email protected]>
pkg/cmd/server/logs.go
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we move this into the pkg/cmd/server/logs dir since it now has a subcommand - to match the rest of the CLI
pkg/cmd/server/list.go
Outdated
var listCmd = &cobra.Command{ | ||
Use: "list", | ||
Aliases: []string{"ls"}, | ||
Short: "Output Daytona Server logs", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like a leftover description, should say "Lists Daytona Server log files.." or something similar
} | ||
} | ||
|
||
func getLogFileSelectionProgramEssentials(files []string) tea.Model { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would be in favour of merging this function with the one above
Signed-off-by: Luka Brecic <[email protected]>
Signed-off-by: Luka Brecic <[email protected]>
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 isdaytona
; main relevant log filedaytona.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 adaytona server logs list
which outputs a list of log files from server.Related Issue(s)
Closes #1343
Screenrecording
Screen.Recording.2024-11-20.at.13.38.50.mov