ramanathan1504 commented on issue #2726:
URL: 
https://github.com/apache/logging-log4j2/issues/2726#issuecomment-3172311509

   You’re correct that previously this lookup was undocumented and didn’t 
function as intended.  
   
   This PR fixes that by:
   - Registering the `jvmrunargs` lookup in the `Interpolator`, enabling 
retrieval of JVM runtime arguments via `${jvmrunargs:...}` expressions.
   - Adding `JvmRunArgsLookupTest` and `JvmRunArgsIntegrationTest` (with a 
sample `log4j2-test.xml`) to verify correct registration and behavior in both 
null and non-null cases.
   - Manually verifying the lookup now returns JVM runtime arguments:
   
   ```java
   StrLookup lookup = new Interpolator();
   System.out.println(lookup.lookup("jvmrunargs:0")); // e.g. 
"-DexampleArg=value"


-- 
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: notifications-unsubscr...@logging.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to