[
https://issues.apache.org/jira/browse/DAFFODIL-2510?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17371444#comment-17371444
]
Mike Beckerle commented on DAFFODIL-2510:
-----------------------------------------
See also: [http://logging.apache.org/log4j/scala/index.html] and
[https://logging.apache.org/log4j/2.x/manual/scala-api.html] about the Scala
API for the Log4J 2 logging library.
We really should be using this. It has its own macro implementation of logging
which defers argument construction (which is a main thing our own logging
library was trying to achieve).
> Thread Safety: Improve Logger/Logging
> --------------------------------------
>
> Key: DAFFODIL-2510
> URL: https://issues.apache.org/jira/browse/DAFFODIL-2510
> Project: Daffodil
> Issue Type: Bug
> Components: Back End, CLI, Front End, Libraries, Middle
> "End", TDML Runner
> Affects Versions: 3.0.0
> Reporter: Mike Beckerle
> Priority: Major
>
> Every object that mixes in the Logging trait gets its own mutable vars for
> logWriter and logLevel, and if not set, shares a single global state in the
> LoggingDefaults object.
> This is not thread safe. At minimum LoggingDefaults should be a ThreadLocal.
> Furthermore, those objects don't need independent ability to specify a unique
> logger or logging level. They should be sharing a logger supplied by the
> application.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)