When I am running my routes in jboss and tracer is logging I get to a point where I generate an Excel file for the customer and then the tracer vomits blood as it tries to write the unprintable body to the screen. See the log below my sig.
I think about how this could be solved and I think the best way I can see is that byte arrays should be logged by tracer as either an array of numbers or as perhaps something base 64 encoded string. If it is base64 encoded then it can be easily decoded with online tools such as: http://www.base64encode.org. For example put in the following string into that tool: SGVsbG8gQ2FtZWwgdXNlcnMsIHRoaXMgaXMgYSB0ZXN0IG9mIHRoZSBpZGVhIHdoaWNoIGlzIGEgcHJvcG9zYWwgZm9yIHRyYWNlciB0byByZW5kZXIgYnl0ZSBzdHJlYW1zIHVzaW5nIGJhc2UgNjQgZW5jb2RpbmcuIA== You can see that if you have a byte array that is assumed to be a json body, for example, then the actual content is easily retrieved. This would prevent the tracer from blowing up on binary streams that are unprintable and even allow the users to recover those streams using a decode tool that produces a file . If the tracer wanted to be really intelligent, it would scan the byte array for any non-printable characters and if it found any would render the stream in base 64 and otherwise would render it normally. *Robert Simmons Jr. MSc. - Lead Java Architect @ EA* *Author of: Hardcore Java (2003) and Maintainable Java (2012)* *LinkedIn: **http://www.linkedin.com/pub/robert-simmons/40/852/a39 <http://www.linkedin.com/pub/robert-simmons/40/852/a39>* JBoss Log: [Server:Local01] 01:05:02,775 INFO [org.apache.camel.processor.interceptor.Tracer] (Camel (CaseAutomationRoutes) thread #0 - AggregateTimeoutChecker) ID-localhost-54666-1385103800097-0-14 >>> (com.ea.automation.fut.FUTCaseAutomationRoutes:FUT13:CompromisedToStudio) marshal[com.ea.wwce.camel.utilities.dataformats.MappedExcelDataFormat@741137e2] --> file:///opt/WWCE_Escalation/FIFA/ToStudio/FIFA2013?fileName=FUT13-CompromisedAccountBatch-%24%7Bdate%3Anow%3AyyyyMMdd-HHmmss%7D.xlsx&tempPrefix=.medf. <<< Pattern:InOnly, Headers:{JMSMessageID=ID:localhost-53764-1385095808237-27:1:7657:1:1, JMSDeliveryMode=2, ea_originating_process=FIFA2013UT_COMPROMISED, JMSCorrelationID=null, CamelSqlRowCount=1, JMSXGroupID=null, previousFireTime=Fri Nov 22 01:04:00 CST 2013, jobRunTime=-1, JMSExpiration=0, breadcrumbId=ID-localhost-54666-1385103800097-0-3, JMSReplyTo=null, triggerName=processAutomationCasesFromDB, JMSRedelivered=false, JMSXUserID=null, scheduledFireTime=Fri Nov 22 01:05:00 CST 2013, JMSTimestamp=1385103900277, JMSType=null, ea_routing_recipients=activemq:queue:ea.case-automation.fifaut.compromised.inbox, JMSDestination=queue://ea.case-automation.fifa13ut.compromised.tostudio, JMSPriority=4, ea_case_count=1, CamelJmsDeliveryMode=2, fireTime=Fri Nov 22 01:05:00 CST 2013, CamelSqlQuery=SELECT * FROM fifa2013cases_lopsided, refireCount=0, triggerGroup=case_automation, nextFireTime=Fri Nov 22 01:06:00 CST 2013}, BodyType:byte[], BodyvCdocProps/core.xml��MK�0���!�v�?(mQ�Wo!�b�A����v����}އaR�vj$���`tMy�(A-M;讦�uzNWM�T�8�8cх=�-�kڇ`K/{T�g1�1y1N�Gׁ�U9c��0�V{[j=�Ji�]��Ei��8 Z 8�B<���7��)�gaNr燅��)����x�����O��i�R�t(�$:��a��_�cqy�]�&g�H9O�|��JvR��_��0�\ij�H6w�{tyN*��uM� P�G1vCK _rels/.rels���N�0 ��}�(��ݐBMwAH�Mh<@H�6jG��� C v����O����g�); Exception in thread "stdout for Server:Local01" java.lang.StringIndexOutOfBoundsException: String index out of range: -1656 at java.lang.String.substring(String.java:1911) at org.jboss.as.process.ManagedProcess$ReadTask.run(ManagedProcess.java:409) at java.lang.Thread.run(Thread.java:724)
