This is an automated email from the ASF dual-hosted git repository.
jlmonteiro pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomee.git
The following commit(s) were added to refs/heads/main by this push:
new 6464b51b10 Improve logging by adding the number of classes before the
list
6464b51b10 is described below
commit 6464b51b10d958c6eac8fe71a596ef53f67fde84
Author: Jean-Louis Monteiro <[email protected]>
AuthorDate: Tue Sep 27 12:18:32 2022 +0200
Improve logging by adding the number of classes before the list
---
.../src/main/java/org/apache/openejb/cdi/CdiScanner.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git
a/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiScanner.java
b/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiScanner.java
index 0bbf070091..b05d7b2cce 100644
---
a/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiScanner.java
+++
b/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiScanner.java
@@ -216,7 +216,10 @@ public class CdiScanner implements BdaScannerService {
if
("true".equalsIgnoreCase(SystemInstance.get().getProperty("openejb.cdi.debug",
"false"))) {
final Logger logger = Logger.getInstance(LogCategory.OPENEJB,
CdiScanner.class.getName());
- logger.info("CDI beans for " +
startupObject.getAppInfo().appId + (startupObject.getWebContext() != null ? "
webcontext = " + startupObject.getWebContext().getContextRoot() : ""));
+ final String webContextName = startupObject.getWebContext() !=
null ?
+ " webcontext = " +
startupObject.getWebContext().getContextRoot() :
+ "";
+ logger.info("Found " + classes.size() + " CDI beans for " +
startupObject.getAppInfo().appId + webContextName);
final List<String> names = new ArrayList<>(classes.size());
for (final Class<?> c : classes) {
names.add(c.getName());