Thursday, July 7, 2011

One-line SOAP Messages

Your logs should be optimized for maintenance in enterprise applications. That means you need to optimize your log for standard text processing with standard tools like GREP. Best practice for XML logs is to make them one line in the log file. So that you can search them with grep command having more than one criteria. If you XML message is not oneline you can use following command to convert them to a one line message and log this with your logger.

s= s.replaceAll("\\r\\n|\\r|\\n", "");
logger.debug(s);


kg

No comments:

LinkWithin

Related Posts Plugin for WordPress, Blogger...