Too much info at Internal Server Error

How can we limit the information displayed at Internal Server Error? is there a way we can display some standard error message which is of generic in nature?

could you please re-phrase your question?

What is the goal you have?

Do you want to limit the the Graylog server logging that is written to the server.log file? If yes, you need to modify the log4j configuration file in of your Graylog installation.

Where to find, depends on your installation: http://docs.graylog.org/en/2.4/pages/configuration/file_location.html

Some details about this log configuration.
https://logging.apache.org/log4j/2.x/manual/configuration.html

Thanks for the response.
I am trying to reduce the information listed at the stack trace. Below is the example:

Internal Server Error

Reason

java.net.URISyntaxException: Malformed escape pair at index 66: http://graylog-alb-490038545.eu-central-1.elb.amazonaws.com:80/ABC%

Stacktrace

java.lang.IllegalArgumentException: java.net.URISyntaxException: Malformed escape pair at index 66: http://graylog-alb-490038545.eu-central-1.elb.amazonaws.com:80/ABC% at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.getRequestUri(GrizzlyHttpContainer.java:491) at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:366) at org.glassfish.grizzly.http.server.HttpHandler$1.run(HttpHandler.java:224) at com.codahale.metrics.InstrumentedExecutorService$InstrumentedRunnable.run(InstrumentedExecutorService.java:176) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: java.net.URISyntaxException: Malformed escape pair at index 66: http://graylog-alb-490038545.eu-central-1.elb.amazonaws.com:80/ABC% at java.net.URI$Parser.fail(URI.java:2848) at java.net.URI$Parser.scanEscape(URI.java:2978) at java.net.URI$Parser.scan(URI.java:3001) at java.net.URI$Parser.checkChars(URI.java:3019) at java.net.URI$Parser.parseHierarchical(URI.java:3105) at java.net.URI$Parser.parse(URI.java:3053) at java.net.URI.<init>(URI.java:588) at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.getRequestUri(GrizzlyHttpContainer.java:489) … 6 more

That is not easy, but possible. See this as reference

It would be helpful if you share your findings.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.