Hi Andriy,

Guess it can be neat to add "client"/"server" (or new EventTypes) to just
have different parent loggers:
https://github.com/apache/cxf/blob/4b43096d1d79d3ba8e169eff1f09b38ea3ec929e/rt/features/logging/src/main/java/org/apache/cxf/ext/logging/slf4j/Slf4jEventSender.java#L55

final String cat = "org.apache.cxf.services." + *[client|server.]* + event.
getPortTypeName().getLocalPart() + "." + event.getType();

to be concrete ;)

Then slf4j binding can be configure to split between client and server
properly.

That said, I suspect it can need the opposite, client+server in the same
file, so the reverse pattern, so it can need to be a configurable pattern
at the end (which has other benefit like putting it in the app namespace
instead of o.a.cxf.services) and being able to configure it per client
(even on the same service). So I'd make this category a feature config
personally.

Hope it makes sense.

Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
<https://www.packtpub.com/application-development/java-ee-8-high-performance>


Le ven. 24 avr. 2020 à 04:34, Andriy Redko <drr...@gmail.com> a écrit :

> Hello Mohana,
>
> The CXF's `org.apache.cxf.ext.logging.LoggingFeature` can be used with
> JAX-WS servers
> as well JAX-RS Endpoints and Clients (as per documentation [1]). Is it
> something you
> have found to be insufficient to segregate client / server logs (at least,
> for JAX-RS)
> or you have different idea in mind? May be some example(s) would help,
> thank you.
>
> Best Regards,
>     Andriy Redko
>
> [1] https://cxf.apache.org/docs/message-logging.html
>
> MRSV> In the existing `org.apache.cxf.ext.logging.LoggingFeature`
> implementation it
> MRSV> is possible to segregate the server jaxws/jaxrs logs and It would be
> nice to
> MRSV> enhance to feature to segregate server/client logs.
>
> MRSV> Ex:  Ideally application can have jaxrs Rest API at the same time it
> can
> MRSV> have rest-client integrations.
>
> MRSV> It would be nice to have separate for logging,  Of course, we can
> achieve
> MRSV> this by introducing custom LogEventSender but it would be nice if
> the CXF
> MRSV> framework having this as a built-in feature.  I would like to submit
> a PR if
> MRSV> this proposal is agreed upon.
>
> MRSV> Ref: https://cxf.apache.org/docs/message-logging.html
>
>
>
> MRSV> --
> MRSV> Sent from: http://cxf.547215.n5.nabble.com/cxf-dev-f569328.html
>
>

Reply via email to