[jboss-jira] [JBoss JIRA] (LOGMGR-201) SysLogHandler doesn't log null or empty message
Vladyslav Baidak (JIRA)
issues at jboss.org
Wed Aug 22 04:37:00 EDT 2018
[ https://issues.jboss.org/browse/LOGMGR-201?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Vladyslav Baidak updated LOGMGR-201:
------------------------------------
Description:
For cases when message is *null* or *empty*, *SysLogHandler* doesn't publish event (there is a correspondent logic in _doPublish_ method)
I expect even *null* or *empty* messages to be sent. Consider the following message logged to CONSOLE handler:
{code:java}
21:21:27,562 ERROR [ch.mobi.jes.jaxrs.exception.converter.internal.mapper.AbstractThrowableMapper] (default task-1) null: java.lang.IllegalArgumentException
at java.util.Optional.orElseThrow(Optional.java:290)
at ch.mobi.apsbau.pdfservice.entity.guarantee.GuaranteeType.resolve(GuaranteeType.java:36)
at ch.mobi.apsbau.pdfservice.mapper.guarantee.GuaranteeMapper.toGuaranteeType(GuaranteeMapper.java:43)
at ch.mobi.apsbau.pdfservice.mapper.guarantee.GuaranteeMapperImpl.toDraftDtoInternal(GuaranteeMapperImpl.java:49)
at ch.mobi.apsbau.pdfservice.mapper.guarantee.GuaranteeMapper.toDraft(GuaranteeMapper.java:28)
at ch.mobi.apsbau.pdfservice.boundary.guarantee.GuaranteeResourceImpl.generateDraft(GuaranteeResourceImpl.java:35)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
{code}
As you can see from example above, the message is null and as a result the entire stacktrace is skipped and not published
was:
For cases when message is *null* or empty, *SysLogHandler* doesn't publish event (there is a correspondent logic in _doPublish _method)
I expect even *null* or *empty* messages to be sent. Consider the following message logged to CONSOLE handler:
{code:java}
21:21:27,562 ERROR [ch.mobi.jes.jaxrs.exception.converter.internal.mapper.AbstractThrowableMapper] (default task-1) null: java.lang.IllegalArgumentException
at java.util.Optional.orElseThrow(Optional.java:290)
at ch.mobi.apsbau.pdfservice.entity.guarantee.GuaranteeType.resolve(GuaranteeType.java:36)
at ch.mobi.apsbau.pdfservice.mapper.guarantee.GuaranteeMapper.toGuaranteeType(GuaranteeMapper.java:43)
at ch.mobi.apsbau.pdfservice.mapper.guarantee.GuaranteeMapperImpl.toDraftDtoInternal(GuaranteeMapperImpl.java:49)
at ch.mobi.apsbau.pdfservice.mapper.guarantee.GuaranteeMapper.toDraft(GuaranteeMapper.java:28)
at ch.mobi.apsbau.pdfservice.boundary.guarantee.GuaranteeResourceImpl.generateDraft(GuaranteeResourceImpl.java:35)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
{code}
As you can see from example above, the message is null and as a result the entire stacktrace is skipped and not published
> SysLogHandler doesn't log null or empty message
> -----------------------------------------------
>
> Key: LOGMGR-201
> URL: https://issues.jboss.org/browse/LOGMGR-201
> Project: JBoss Log Manager
> Issue Type: Bug
> Components: core
> Affects Versions: 2.1.4.Final
> Reporter: Vladyslav Baidak
> Fix For: 2.1.5.Final
>
>
> For cases when message is *null* or *empty*, *SysLogHandler* doesn't publish event (there is a correspondent logic in _doPublish_ method)
> I expect even *null* or *empty* messages to be sent. Consider the following message logged to CONSOLE handler:
> {code:java}
> 21:21:27,562 ERROR [ch.mobi.jes.jaxrs.exception.converter.internal.mapper.AbstractThrowableMapper] (default task-1) null: java.lang.IllegalArgumentException
> at java.util.Optional.orElseThrow(Optional.java:290)
> at ch.mobi.apsbau.pdfservice.entity.guarantee.GuaranteeType.resolve(GuaranteeType.java:36)
> at ch.mobi.apsbau.pdfservice.mapper.guarantee.GuaranteeMapper.toGuaranteeType(GuaranteeMapper.java:43)
> at ch.mobi.apsbau.pdfservice.mapper.guarantee.GuaranteeMapperImpl.toDraftDtoInternal(GuaranteeMapperImpl.java:49)
> at ch.mobi.apsbau.pdfservice.mapper.guarantee.GuaranteeMapper.toDraft(GuaranteeMapper.java:28)
> at ch.mobi.apsbau.pdfservice.boundary.guarantee.GuaranteeResourceImpl.generateDraft(GuaranteeResourceImpl.java:35)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> {code}
> As you can see from example above, the message is null and as a result the entire stacktrace is skipped and not published
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
More information about the jboss-jira
mailing list