[ 
https://issues.apache.org/jira/browse/CAMEL-19724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17751916#comment-17751916
 ] 

Claus Ibsen commented on CAMEL-19724:
-------------------------------------

This is likely only when we do concurrent unit tests with camel standalone.

For users that run camel on SB / Q / Karaf or Camel Main then Log4j is 
initialized as part of that.



> camel-core: core may lose log messages under concurrent initialization
> ----------------------------------------------------------------------
>
>                 Key: CAMEL-19724
>                 URL: https://issues.apache.org/jira/browse/CAMEL-19724
>             Project: Camel
>          Issue Type: Bug
>          Components: came-core
>    Affects Versions: 4.0-RC2
>            Reporter: Otavio Rodolfo Piske
>            Assignee: Otavio Rodolfo Piske
>            Priority: Major
>
> When a system performs concurrent initialization of Camel, there's a good 
> chance that it may lose messages due to [log 
> substitution|https://www.slf4j.org/codes.html#substituteLogger] behavior. 
> This is more likely to happen in tests (such as camel-quartz ones - highly 
> concurrent) than in actual production code (though, it's still possible for 
> some applications). 
> Nonetheless, this can cause a lot of confusion during debugging, as some log 
> messages may not be present on the logs. The ones likely to be dropped on the 
> logs are the ones called during build/initialization. 
> I think we can do 2 things to reduce the incidence of this problem: 
> - Delay the logger initialization in a few key places
> - Add a note in the documentation, that the logging framework should be 
> properly initialized before running Camel in highly concurrent scenarios 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to