camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "kraythe ." <>
Subject Tracer Should Ignore unprintable output
Date Fri, 22 Nov 2013 07:26:17 GMT
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: For example put in the following string into
that tool:


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: **

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 >>>
<<< Pattern:InOnly,
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,,
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[],




Exception in thread "stdout for Server:Local01"
java.lang.StringIndexOutOfBoundsException: String index out of range: -1656
at java.lang.String.substring(

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message