linghengqian commented on issue #2794:
URL: 
https://github.com/apache/logging-log4j2/issues/2794#issuecomment-2267433432

   @vy 
   
   - I executed `mvn test -Dtest=TestHplsqlLocal -Dmaven.surefire.debug` and 
started remote debugging on IntelliJ IDEA side. But things are getting weird. 
Neither the full-args constructor of 
`org.apache.logging.log4j.status.StatusConsoleListener` nor 
`org.apache.logging.log4j.status.StatusConsoleListener#setLevel(org.apache.logging.log4j.Level)`
 was called for either apache/logging-log4j2:2.23.0 where unit test execution 
succeeded, or apache/logging-log4j2:2.23.1 where unit test execution failed.
   - 
![image](https://github.com/user-attachments/assets/0b192656-f8e8-4806-a70b-c7d2f063272e)
   - 
![image](https://github.com/user-attachments/assets/53563bcb-d6be-4708-8747-3f86e2865e55)
   - But I did debug in `org.apache.hive.hplsql.Exec#init()` that the system 
property of `log4j.configurationFile` was successfully set to 
`hive-log4j2.properties`. This is what `apache/logging-log4j2:2.23.1` can do.
   - 
![image](https://github.com/user-attachments/assets/8b2766e2-0cd4-49fb-87cb-1988856e6176)
   - 
![image](https://github.com/user-attachments/assets/692544c8-95e2-4677-861c-5c43e41c4f7f)
   - I feel like there is nothing wrong with the way I debug into unit testing. 
I’m still not sure which way to go.
   ```shell
   git clone [email protected]:linghengqian/hive.git -b test-v2230-log4j
   cd ./hive/
   sdk install java 8.0.422-tem
   sdk use java 8.0.422-tem
   sdk install maven
   mvn clean install -DskipTests
   mvn test -Dtest=TestHplsqlLocal -Dmaven.surefire.debug
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to