Hi,
On 13/02/12 15:46, Daniel Kulp wrote:

Looks OK to me.  The only additional suggestion I have is to add the flags to
the @Logging annotation as well to keep that consistent and up to date.

Sure, added a 'showBinary' annotation property, set to 'false' by default.
I will also investigate later on how to deal with multipart/* without having too many temp files created, I thought may be we can get SequenceInputStream, with some individual InputStreams set to "--- Binary Content---",

thanks, Sergey


Dan


On Monday, February 13, 2012 11:47:12 AM Sergey Beryozkin wrote:
Hi

I'd like to get the Logging interceptors updated to report the 'pure'
binary payload only optionally. Right now I'm working on a demo where an
image payload is uploaded and then returned and I'm finding it difficult
to view through the logs with the binary content being logged.

So I'd like to suggest that only a string 'representing' such a payload
is logged, example:

ID: 41
Response-Code: 200
Content-Type: image/png
Headers: {Date=[Mon, 13 Feb 2012 11:30:40 GMT], Content-Length=[18522]}
Messages: --- Binary Content ---

where  "--- Binary Content ---" replaces the actual 18K binary data.

If really needed showing the binary payload can be enforced by setting a
relevant property. For a start, "application/octet-stream" and "image/*"
media types are checked...

I've attached a patch to [1], I'll apply it a bit later on if we agree
it does make sense.

Thanks, Sergey

[1] https://issues.apache.org/jira/browse/CXF-4102

Reply via email to