You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by Olivier Mengué <om...@oxymel.com> on 2010/03/04 18:18:26 UTC

RE : Call for wider input on AXIS2C-1455 (logging API)



Samisa Abeysinghe wrote:
>I think the requirement is to use something other than a file system to
>log.

>My understanding is that, you can extend the current API to do this. May be
>the API semantics are focusing on file based logging. But you can plug your
>own impl to do whatever you want.

That what I would like to do.

>Note that, when you have your own impl, since you are in control, there is
>no 'private' scope in the impl.



>Re: "add a ''open log' operation to axutil_log_ops_t and move most of the
>code in axutil_log_create() to a private axutil_log_impl_open(). "
>The concern that I have is how it would impact the current implementation -
>because we use this thought the current code - the create and then open
>semantics is assumed. And create allocates memory and open opens up
>the descriptors.

I'm beginning to see the light.


>Quite a bit of thought went in to this API when this was
>originally designed, and it was the understanding that
>this separation empowers extension like the way you want.

>The easiest is to make sure you have your own impl, that override
>the behavior the way you want.  You have to use create, to allow allocation
>of memory and intilizations necessary. Then use open the way you want, or
>ignore it, if you do not have anything to be done in the space.

My error was to try to reuse axutil_log_create() which I thought was the entry point of the API.

Instead, I now think have to replace it with my own implementation that returns a struct whose first member is an axutil_log_t. The other data of this struct will be my custom data.

Could you confirm?

>When you plug Axis2/C logs to your own logging system, you
>can initialize logging outside Axis2/C and then plug the writes from Axis2/C
>to your logging system via the custom implementation.
>I do not see any need to change the current Axis2/C API.

I'm begining to understand the design...

Olivier.

RE : Call for wider input on AXIS2C-1455 (logging API)

Posted by Olivier Mengué <om...@oxymel.com>.

I wrote:

>I'm beginning to see the light.
>
>My error was to try to reuse axutil_log_create() which I thought was the entry point of the API.
>Instead, I now think have to replace it with my own implementation that returns a struct whose first member is an axutil_log_t. The other data of this struct will be my custom data.
>
>I'm begining to understand the design...

I was right and I wrote a proof of concept of an alternate logging implementation. The source code is attached to issue AXIS2C-1455. The direct link is here:
https://issues.apache.org/jira/secure/attachment/12437912/test-axis2-log-2.c

Olivier.

RE : Call for wider input on AXIS2C-1455 (logging API)

Posted by Olivier Mengué <om...@oxymel.com>.

I wrote:

>I'm beginning to see the light.
>
>My error was to try to reuse axutil_log_create() which I thought was the entry point of the API.
>Instead, I now think have to replace it with my own implementation that returns a struct whose first member is an axutil_log_t. The other data of this struct will be my custom data.
>
>I'm begining to understand the design...

I was right and I wrote a proof of concept of an alternate logging implementation. The source code is attached to issue AXIS2C-1455. The direct link is here:
https://issues.apache.org/jira/secure/attachment/12437912/test-axis2-log-2.c

Olivier.