This is an automated email from the ASF dual-hosted git repository.

rmaucher pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat-jakartaee-migration.git


The following commit(s) were added to refs/heads/main by this push:
     new 9a946e3  Best effort for logging level configuration
     new 7d0e7e1  Merge branch 'main' of 
[email protected]:apache/tomcat-jakartaee-migration.git into main
9a946e3 is described below

commit 9a946e3a4ce5c2fba7e511a76ec51b962895ed09
Author: remm <[email protected]>
AuthorDate: Fri Apr 24 11:58:30 2026 +0200

    Best effort for logging level configuration
    
    Issue 108
---
 src/main/java/org/apache/tomcat/jakartaee/MigrationCLI.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/tomcat/jakartaee/MigrationCLI.java 
b/src/main/java/org/apache/tomcat/jakartaee/MigrationCLI.java
index b2c90dd..33a0ef8 100644
--- a/src/main/java/org/apache/tomcat/jakartaee/MigrationCLI.java
+++ b/src/main/java/org/apache/tomcat/jakartaee/MigrationCLI.java
@@ -85,7 +85,9 @@ public class MigrationCLI {
                     invalidArguments();
                 }
                 // Configure the explicit level
-                
Logger.getGlobal().getParent().getHandlers()[0].setLevel(level);
+                if (Logger.getGlobal().getParent().getHandlers().length > 0) {
+                    
Logger.getGlobal().getParent().getHandlers()[0].setLevel(level);
+                }
                 Logger.getGlobal().getParent().setLevel(level);
             } else if (argument.startsWith(PROFILE_ARG)) {
                 iter.remove();


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to