Skip to content

Commit 0bd3e69

Browse files
Merge pull request #42 from opsgenie/HMS-149
Adding Default Limit Value to Download Logs
2 parents 5c8c4da + ed27983 commit 0bd3e69

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

cfg/lamp_command_config.go

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package cfg
2+
3+
const (
4+
listLogCommandDefaultBucketSize int = 1000
5+
)
6+
7+
func GetlistLogCommandDefaultBucketSize() int {
8+
return listLogCommandDefaultBucketSize
9+
}

command/command.go

+5
Original file line numberDiff line numberDiff line change
@@ -234,3 +234,8 @@ func readConfigFile(c *gcli.Context) {
234234
cfg.LoadConfiguration()
235235
}
236236
}
237+
238+
func getListLogsCommandDefaultSize() int{
239+
return cfg.GetlistLogCommandDefaultBucketSize()
240+
}
241+

command/log_cmd.go

+2
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ func DownloadLogs(c *gcli.Context) {
4242
printMessage(DEBUG,"Downloading log files into current directory..")
4343
}
4444

45+
req.Limit = getListLogsCommandDefaultSize()
46+
4547
endDate := ""
4648
if val, success := getVal("end", c); success {
4749
endDate = val

0 commit comments

Comments
 (0)