-
Notifications
You must be signed in to change notification settings - Fork 492
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
add egctl edit, egctl logs, update egctl create cmd #1067
Changes from 1 commit
02a4901
c527116
e7cc5b7
fad067a
0782333
ff07cdb
392a393
267f0a0
023dafe
afcf76a
4b04d19
0d9548f
7f62308
2ad235c
b38fc6b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,11 +31,18 @@ import ( | |
func LogsCmd() *cobra.Command { | ||
var n int | ||
var follow bool | ||
examples := []general.Example{ | ||
{Desc: "Print the most recent 500 logs by default.", Command: "egctl logs"}, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why not print all logs like other logs by default. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah. Here are my concerns.
Just my naive opinions, I am ok to change it to print all logs. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't know another command line to do like this, does this usage have a precedent? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Well, I am not sure these cases are precedent. But for really long logs, these tools not print them all by default.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You are right. I am just a little afraid that in practice, when user run There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Then it is. |
||
{Desc: "Print the most recent 100 logs.", Command: "egctl logs --tail 100"}, | ||
{Desc: "Print all logs.", Command: "egctl logs --tail -1"}, | ||
{Desc: "Print the most recent 500 logs and streaming the log.", Command: "egctl logs -f"}, | ||
} | ||
|
||
cmd := &cobra.Command{ | ||
Use: "logs", | ||
Short: "Print the logs of Easegress server", | ||
Args: cobra.NoArgs, | ||
Use: "logs", | ||
Short: "Print the logs of Easegress server", | ||
Args: cobra.NoArgs, | ||
Example: createMultiExample(examples), | ||
Run: func(cmd *cobra.Command, args []string) { | ||
query := fmt.Sprintf("?tail=%d&follow=%v", n, follow) | ||
p := general.LogsURL + query | ||
|
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.
propose not adding
-server
suffix to the name, user may get confused what he/she has created.for the pipeline names, also propose not using the
pipeline-x
suffixes.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.
good idea. I will update that!