
com.mindscapehq.raygun4java.play2.RaygunPlayJavaRequestMessage Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of raygun4java-play2 Show documentation
Show all versions of raygun4java-play2 Show documentation
The official provider for the Raygun Crash Reporting service. This is the Play Framework provider module that sends errors caught from your Play Scala/Java application. Used in conjunction with raygun4java.core.
package com.mindscapehq.raygun4java.play2;
import java.util.Map;
import java.util.logging.Logger;
import play.mvc.Http.Request;
public class RaygunPlayJavaRequestMessage extends RaygunPlayRequestMessage
{
public RaygunPlayJavaRequestMessage(Request request)
{
try
{
httpMethod = request.method();
ipAddress = request.remoteAddress();
hostName = request.host();
url = request.uri();
headers = flattenMap(request.headers());
Map queryMap = request.queryString();
if (queryMap != null)
{
queryString = flattenMap(queryMap);
}
Map formMap = request.body().asFormUrlEncoded();
if (formMap != null)
{
form = flattenMap(formMap);
}
}
catch (NullPointerException e)
{
Logger.getLogger("Raygun4Java-Play2").info("Couldn't get all request params: " + e.getMessage());
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy