Skip to content

Commit

Permalink
bug fix for ?n=0 --> all matching logs
Browse files Browse the repository at this point in the history
  • Loading branch information
mikebd committed Oct 9, 2023
1 parent 045950f commit 87d4797
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion controller/rest/v1/logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func GetLog(w http.ResponseWriter, r *http.Request, p httprouter.Params) {
textMatch := r.URL.Query().Get("q")

maxLines, _ := util.PositiveIntParamStrict(w, r, config.GetArguments().NumberOfLogLines, "n")
if maxLines > 0 {
if maxLines >= 0 {
logEvents, err := service.GetLog(config.LogDirectory, logFilename, textMatch, maxLines)

if err == nil {
Expand Down

0 comments on commit 87d4797

Please sign in to comment.