[ https://issues.apache.org/jira/browse/LOG4J2-3017?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17283092#comment-17283092 ]
Volkan Yazici edited comment on LOG4J2-3017 at 2/11/21, 3:37 PM: ----------------------------------------------------------------- [~mattsicker], I think creating a {{log4j-groovy}} facade is a valid option, though a long-term one. What I had in mind is to patch this issue in certain places (e.g., {{MutableLogEvent#setMessage(Message)}}) of the Log4j core. We can ship such a solution to 2.14.1. This said, I am not sure of the extent of such a patch and whether we will be able to cover all cases or not – hence I am reaching out to you. [~rgoers], indeed casting {{GString}} to {{String}} at the call site would solve the issue. But, in my opinion, it is not practical to expect this from Groovy users. was (Author: vy): [~mattsicker], I think creating a {{log4j-groovy}} facade is a valid option, though a long-term one. What I had in mind is to patch this issue in certain places (e.g., {{MutableLogEvent#setMessage(Message)}} of the Log4j core. We can ship such a solution to 2.14.1. This said, I am not sure of the extent of such a patch and whether we will be able to cover all cases or not – hence I am reaching out to you. [~rgoers], indeed casting {{GString}} to {{String}} at the call site would solve the issue. But, in my opinion, it is not practical to expect this from Groovy users. > Groovy logging of GString with $ notation is very slow > ------------------------------------------------------ > > Key: LOG4J2-3017 > URL: https://issues.apache.org/jira/browse/LOG4J2-3017 > Project: Log4j 2 > Issue Type: Improvement > Reporter: Liviu Carausu > Assignee: Volkan Yazici > Priority: Major > Attachments: SomeClass.groovy, TestLogging.groovy > > > > Logging of GString is very slow. -- This message was sent by Atlassian Jira (v8.3.4#803005)