Skip to content

Commit

Permalink
HPCC-30121 Ensure proper default max log recs
Browse files Browse the repository at this point in the history
- Ensures default max log recs is set in zap report
- Utilize getParameterInt

Signed-off-by: Rodrigo Pastrana <[email protected]>
  • Loading branch information
rpastrana committed Aug 18, 2023
1 parent 9e51f66 commit 6ac51b8
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions esp/services/ws_workunits/ws_workunitsHelpers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -231,16 +231,11 @@ struct WUComponentLogOptions
setReturnColumMode(colMode, customFields);
}

StringBuffer lineLimit;
zapHttpRequest->getParameter("LogFilter_LineLimit", lineLimit);
if (!lineLimit.isEmpty())
{
int limit = strtoll(lineLimit.str(), nullptr, 10);
if (limit < 0)
throw makeStringException(ECLWATCH_INVALID_INPUT, "Zap LogFilter encountered negative line limit!");
int limit = zapHttpRequest->getParameterInt("LogFilter_LineLimit", defaultMaxLogRecords);
if (limit < 0)
throw makeStringException(ECLWATCH_INVALID_INPUT, "Zap LogFilter encountered negative line limit!");

logFetchOptions.setLimit((unsigned)limit);
}
logFetchOptions.setLimit((unsigned)limit);

StringBuffer startFrom;
zapHttpRequest->getParameter("LogFilter_LineStartFrom", startFrom);
Expand Down

0 comments on commit 6ac51b8

Please sign in to comment.