I would like to know why new lines (\n) are available in the strack trace and why are not getting displayed in a new line. What settings I have to make such that the error stack trace appear with new line as traditional loggers and message also has has all the backslash special charecters ''
{
"@timestamp": "2018-01-27T14:52:36.708+04:00",
"@version": 1,
"message": "Invalid Request Exception: "responsePayload\":\"{\\\"status\\\":\\\"FAIL\\\",\\\"statusCode\\\":1190,\\\"",
"logger_name": "com.json.logging.demo.web.controller.ErrorHandler",
"thread_name": "http-nio-3009-exec-1",
"level": "ERROR",
"level_value": 40000,
"stack_trace": "com.json.logging.demo.exception.PullEmployeeDataException: null\n\tat
com.json.logging.demo.web.controller.admin.EmployeeCodeController$
$FastClassBySpringCGLIB$$15b35cb5.invoke(<generated>)\n\tat
org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)\n\tat
org.springframework.aop.framework.CglibAopProxy$ glibAopProxy.java:721)\n\"
}
I expect the output as below. I expect that the output should omit backslash charecters () and read new lines and spaces (\n\t) and print as below
{
"@timestamp": "2018-01-27T14:52:36.708+04:00",
"@version": 1,
"message": "Invalid Request Exception: "responsePayload\":\"{ "status ": "FAIL ", "statusCode ":1190,"",
"logger_name": "com.json.logging.demo.web.controller.ErrorHandler",
"thread_name": "http-nio-3009-exec-1",
"level": "ERROR",
"level_value": 40000,
"stack_trace": "com.json.logging.demo.exception.PullEmployeeDataException: null
at com.json.logging.demo.web.controller.admin.EmployeeCodeController
$FastClassBySpringCGLIB$$15b35cb5.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
at org.springframework.aop.framework.CglibAopProxy$ glibAopProxy.java:721)"
}