You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Yaytay (JIRA)" <ji...@apache.org> on 2012/06/09 11:44:42 UTC
[jira] [Created] (CXF-4368) LoggingInterceptors don't encourage
reuse
Yaytay created CXF-4368:
---------------------------
Summary: LoggingInterceptors don't encourage reuse
Key: CXF-4368
URL: https://issues.apache.org/jira/browse/CXF-4368
Project: CXF
Issue Type: Improvement
Affects Versions: 2.6
Reporter: Yaytay
Priority: Minor
I have my own logging interceptors that write to a database.
The code for these is largely a copy of the code in LoggingInInterceptor and LoggingOutInterceptor, but as a copy it doesn't take advantage of changes in those interceptors which may be necessary to take advantage of changes in CXF.
As a minimum I propose changing the line:
log(logger, buffer.toString());
to be a call to an overridable method so that the buffer can be accessed by subclasses.
I may also introduce other overridable methods to give access to the raw Message and abstract the LoggingMessage so that more custom data can be collected.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Assigned] (CXF-4368) LoggingInterceptors don't encourage
reuse
Posted by "Freeman Fang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-4368?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Freeman Fang reassigned CXF-4368:
---------------------------------
Assignee: Freeman Fang
> LoggingInterceptors don't encourage reuse
> -----------------------------------------
>
> Key: CXF-4368
> URL: https://issues.apache.org/jira/browse/CXF-4368
> Project: CXF
> Issue Type: Improvement
> Affects Versions: 2.6
> Reporter: Yaytay
> Assignee: Freeman Fang
> Priority: Minor
> Attachments: CXF-4368.diff
>
>
> I have my own logging interceptors that write to a database.
> The code for these is largely a copy of the code in LoggingInInterceptor and LoggingOutInterceptor, but as a copy it doesn't take advantage of changes in those interceptors which may be necessary to take advantage of changes in CXF.
> As a minimum I propose changing the line:
> log(logger, buffer.toString());
> to be a call to an overridable method so that the buffer can be accessed by subclasses.
> I may also introduce other overridable methods to give access to the raw Message and abstract the LoggingMessage so that more custom data can be collected.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CXF-4368) LoggingInterceptors don't encourage
reuse
Posted by "Yaytay (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-4368?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Yaytay updated CXF-4368:
------------------------
Attachment: CXF-4368.diff
Something like this, which introduces a LoggingMessage interface and takes any knowledge of the LoggingMessageImpl away from the LoggingInInterceptor and LoggingOutInterceptor (leaving it in a few methods in the AbstractLoggingInterceptor).
By deriving from the Logging*Interceptors and overriding the methods in AbstractLoggingInterceptor I can now do my own thing, whilst keeping the clever handling of streams in the core CXF.
> LoggingInterceptors don't encourage reuse
> -----------------------------------------
>
> Key: CXF-4368
> URL: https://issues.apache.org/jira/browse/CXF-4368
> Project: CXF
> Issue Type: Improvement
> Affects Versions: 2.6
> Reporter: Yaytay
> Priority: Minor
> Attachments: CXF-4368.diff
>
>
> I have my own logging interceptors that write to a database.
> The code for these is largely a copy of the code in LoggingInInterceptor and LoggingOutInterceptor, but as a copy it doesn't take advantage of changes in those interceptors which may be necessary to take advantage of changes in CXF.
> As a minimum I propose changing the line:
> log(logger, buffer.toString());
> to be a call to an overridable method so that the buffer can be accessed by subclasses.
> I may also introduce other overridable methods to give access to the raw Message and abstract the LoggingMessage so that more custom data can be collected.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CXF-4368) LoggingInterceptors don't encourage
reuse
Posted by "Freeman Fang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-4368?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13431654#comment-13431654 ]
Freeman Fang commented on CXF-4368:
-----------------------------------
Hi,
I believe the changes in CXF-4392 already meet your requirements. You can extend cxf LoggingIn|OutInterceptors and override the formatLoggingMessage method, where you can do whatever you want for the log message.
[1]https://issues.apache.org/jira/browse/CXF-4392
Freeman
> LoggingInterceptors don't encourage reuse
> -----------------------------------------
>
> Key: CXF-4368
> URL: https://issues.apache.org/jira/browse/CXF-4368
> Project: CXF
> Issue Type: Improvement
> Affects Versions: 2.6
> Reporter: Yaytay
> Priority: Minor
> Attachments: CXF-4368.diff
>
>
> I have my own logging interceptors that write to a database.
> The code for these is largely a copy of the code in LoggingInInterceptor and LoggingOutInterceptor, but as a copy it doesn't take advantage of changes in those interceptors which may be necessary to take advantage of changes in CXF.
> As a minimum I propose changing the line:
> log(logger, buffer.toString());
> to be a call to an overridable method so that the buffer can be accessed by subclasses.
> I may also introduce other overridable methods to give access to the raw Message and abstract the LoggingMessage so that more custom data can be collected.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (CXF-4368) LoggingInterceptors don't encourage
reuse
Posted by "Freeman Fang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-4368?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Freeman Fang resolved CXF-4368.
-------------------------------
Resolution: Duplicate
> LoggingInterceptors don't encourage reuse
> -----------------------------------------
>
> Key: CXF-4368
> URL: https://issues.apache.org/jira/browse/CXF-4368
> Project: CXF
> Issue Type: Improvement
> Affects Versions: 2.6
> Reporter: Yaytay
> Assignee: Freeman Fang
> Priority: Minor
> Attachments: CXF-4368.diff
>
>
> I have my own logging interceptors that write to a database.
> The code for these is largely a copy of the code in LoggingInInterceptor and LoggingOutInterceptor, but as a copy it doesn't take advantage of changes in those interceptors which may be necessary to take advantage of changes in CXF.
> As a minimum I propose changing the line:
> log(logger, buffer.toString());
> to be a call to an overridable method so that the buffer can be accessed by subclasses.
> I may also introduce other overridable methods to give access to the raw Message and abstract the LoggingMessage so that more custom data can be collected.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira