vy commented on issue #2323:
URL:
https://github.com/apache/logging-log4j2/issues/2323#issuecomment-1973817521
@hpcnx, I am not able to understand how does your `logger.info("foo {}")`
call in JavaScript gets translated to `logger.info("foo {}", new Object[0])` in
Java. The following works for me:
```
import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;
import javax.script.ScriptException;
public class Issue2323 {
public static void main(String[] args) throws ScriptException {
ScriptEngine engine = new
ScriptEngineManager().getEngineByName("nashorn");
engine.eval("Packages.org.apache.logging.log4j.LogManager.getLogger().error('foo
{}');");
}
}
```
AFAIC, this is not a Log4j issue. If you think otherwise, please produce a
*minimal* (where all necessary code is removed!) reproduction example.
I suspect something unexpected is going with your `CustomLogger`
implementation. I suggest you to put a breakpoint into
`AbstractLogger#info(String,Object[])` and try to figure out why doesn't
`#info(String)` get called instead.
--
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]