Skip to content

Commit

Permalink
feat(request): log when requested
Browse files Browse the repository at this point in the history
  • Loading branch information
ansoncfit committed Apr 20, 2019
1 parent 42bab1a commit da91001
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ public abstract class AnalysisTask extends ProfileRequest {
*/
public int nPathsPerTarget = 3;

public boolean logRequest = false;

/**
* Is this a task that should return a binary travel time surface or compute accessibility and return it via SQS
* to be saved in a regional analysis grid file?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ public Object handleSinglePoint (Request request, Response response) throws IOEx
TravelTimeSurfaceTask task = JsonUtilities.objectFromRequestBody(request, TravelTimeSurfaceTask.class);
// TODO do not return raw binary data from method, return better typed response.
// TODO possibly move data preloading to this point, to allow returning different HTTP status codes.
LOG.info(request.body());

if (task.logRequest){
LOG.info(request.body());
}

try {
try {
byte[] binaryResult = analystWorker.handleOneSinglePointTask(task);
Expand Down

0 comments on commit da91001

Please sign in to comment.