Skip to content

Commit

Permalink
Merge pull request #42 from opsgenie/HMS-149
Browse files Browse the repository at this point in the history
Adding Default Limit Value to Download Logs
  • Loading branch information
prakhar-mudaiya authored Mar 24, 2021
2 parents 5c8c4da + ed27983 commit 0bd3e69
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
9 changes: 9 additions & 0 deletions cfg/lamp_command_config.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package cfg

const (
listLogCommandDefaultBucketSize int = 1000
)

func GetlistLogCommandDefaultBucketSize() int {
return listLogCommandDefaultBucketSize
}
5 changes: 5 additions & 0 deletions command/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -234,3 +234,8 @@ func readConfigFile(c *gcli.Context) {
cfg.LoadConfiguration()
}
}

func getListLogsCommandDefaultSize() int{
return cfg.GetlistLogCommandDefaultBucketSize()
}

2 changes: 2 additions & 0 deletions command/log_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ func DownloadLogs(c *gcli.Context) {
printMessage(DEBUG,"Downloading log files into current directory..")
}

req.Limit = getListLogsCommandDefaultSize()

endDate := ""
if val, success := getVal("end", c); success {
endDate = val
Expand Down

0 comments on commit 0bd3e69

Please sign in to comment.