Skip to content
This repository has been archived by the owner on Apr 1, 2023. It is now read-only.

APIMAN-897 Adding a simple log policy #44

Merged
merged 1 commit into from Jan 15, 2016

Conversation

tonswieb
Copy link
Contributor

Hi,

As a first attempt for https://issues.jboss.org/browse/APIMAN-897 I create a very simple log policy for the 1.1.x branch.
Could you add it to the main project? It would make it a lot easier to use the plugin from within apiman.
Thanks.

Regards,

Ton

@EricWittmann
Copy link
Member

Nice, thanks.

We should add a json schema to this for configuration, along with adding a configuration option for which direction (request, response, both) should be logged.

EricWittmann added a commit that referenced this pull request Jan 15, 2016
APIMAN-897 Adding a simple log policy
@EricWittmann EricWittmann merged commit e861ecc into apiman:1.1.x Jan 15, 2016
@tonswieb tonswieb deleted the APIMAN-897 branch January 15, 2016 12:49
@EricWittmann
Copy link
Member

@tonswieb - Note: I have migrated this policy to the master branch. In addition, I added a configuration schema along with an option to choose whether you want to log headers from the Request, the Response, or Both. Have a look:

https://github.com/apiman/apiman-plugins/blob/master/log-policy/src/main/apiman/policyDefs/schemas/log-policyDef.schema

@tonswieb
Copy link
Contributor Author

Thanks for merging to master and adding the policy. Looks great! I will take it for a test drive.
Is there a particular reason why logging frameworks are not used within Apiman plugins, but instead stdout is used? Or perhaps they are used, but I haven't run into them yet?

@EricWittmann
Copy link
Member

It's something that's been a low priority task on the to-do list for awhile now. Here is an older JIRA to add a logging component that can be used by policies:

https://issues.jboss.org/browse/APIMAN-586

It needs to be addressed at some point, but we just haven't gotten to it yet.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants