[jboss-jira] [JBoss JIRA] (WFWIP-291) Log messages from io.smallrye.openapi don't have message ID

Fabio Burzigotti (Jira) issues at jboss.org
Wed Jan 8 05:49:31 EST 2020


    [ https://issues.redhat.com/browse/WFWIP-291?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13943529#comment-13943529 ] 

Fabio Burzigotti commented on WFWIP-291:
----------------------------------------

Hi [~pferraro], I do not agree on the argument that log message IDs are intended only for what relates to internationalization.
Those can in fact be used to perform automated log observation, statistics and so on. 
These activities are then even more important in a cloud native/orchestrated environment, where systems and components do interoperation, and we know MicroProfile specs are definitely relating to this kind of environment.
So I am asking for you to keep this issue open as the topic is common to all MP specs we're integrating and there are similar issues that haven't been closed, see for instance https://issues.redhat.com/browse/WFWIP-280. My propposal is to re open it and wait until some common approach to the topic is decided. 
[~rsvoboda] WDYT?

[~dlofthouse], thanks for your information. 
Once again, I don't really think this is _just_ about internationalization.

That said, although I can I agree on your first argument:

{quote}
Additionally there is also a general issue in that we can not impose our own logging formats on third party projects pulled into WildFly.

If a third party project throws an Exception we can catch we may have an opportunity to catch and log with an ID or rethrow with an ID but we don't have options to intercept messages directly logged.
{quote}

... it's definitely good to know that SmallRye is being receptive to our feedback, as it could become important once Wildfly end users will notice that - for instance - they cannot search the Internet or the community/product docs for a message ID but for a variable text message.
 
Finally, I'd like to point out that in current MP OpenAPI SmallRye implementation, even WARNs and INFOs are not given a message ID:

{quote}
$ find . -name '*.*' -type f -print0 | xargs -0 grep --color -n -e 'LOG.warn'
./implementation/src/main/java/io/smallrye/openapi/runtime/scanner/ParameterProcessor.java:551:                        LOG.warnf("Matrix parameter references missing path segment: %s", segmentName);
{quote}

> Log messages from io.smallrye.openapi don't have message ID
> -----------------------------------------------------------
>
>                 Key: WFWIP-291
>                 URL: https://issues.redhat.com/browse/WFWIP-291
>             Project: WildFly WIP
>          Issue Type: Bug
>          Components: MP OpenAPI
>            Reporter: Fabio Burzigotti
>            Assignee: Paul Ferraro
>            Priority: Major
>
> Messages logged by io.smallrye.openapi don't have assigned ID:
> {code}
> 2020-01-05 16:58:49,225 DEBUG [io.smallrye.openapi.runtime.util.SchemaFactory] (MSC service thread 1-4) Processing a single @Schema annotation.
> 2020-01-05 16:58:49,225 DEBUG [io.smallrye.openapi.runtime.scanner.OpenApiAnnotationScanner] (MSC service thread 1-4) Processing a single @Response annotation.
> 2020-01-05 16:58:49,225 DEBUG [io.smallrye.openapi.runtime.scanner.OpenApiAnnotationScanner] (MSC service thread 1-4) Processing jax-rs method: {0}
> 2020-01-05 16:58:49,225 DEBUG [io.smallrye.openapi.runtime.scanner.OpenApiDataObjectScanner] (MSC service thread 1-4) Starting processing with root: java.lang.String
> {code}
> A search in SmallRye implementation seems to show that IDs are not used even when level is WARN:
> {code}
> $ find . -name '*.*' -type f -print0 | xargs -0 grep --color -n -e 'LOG.warn'
> ./implementation/src/main/java/io/smallrye/openapi/runtime/scanner/ParameterProcessor.java:551:                        LOG.warnf("Matrix parameter references missing path segment: %s", segmentName);
> ./implementation/src/main/java/io/smallrye/openapi/runtime/scanner/ParameterProcessor.java:1147:            LOG.warnf("Value '%s' is not a valid %s default", stringValue, primitive.name().toLowerCase());
> {code}



--
This message was sent by Atlassian Jira
(v7.13.8#713008)


More information about the jboss-jira mailing list