Jeff Shaw created LOG4J2-2360:
---------------------------------
Summary: Expose SourceLocation to public API
Key: LOG4J2-2360
URL: https://issues.apache.org/jira/browse/LOG4J2-2360
Project: Log4j 2
Issue Type: Improvement
Reporter: Jeff Shaw
I learned there are three features of log4j2 and its official Scala API that
could work together to improve performance with some API changes.
Log4j2's messages can include the source file name and line number.
Scala macros can be used to provide compile time file names and line numbers to
runtime for zero cost. However, there is currently not a good way to combine
the two.
I created the changes we'd need to allow clients of log4j2 to manually provide
SourceLocation for a log message, and then I used the new methods to create
SourceLocation for Scala files at compile time.
For log4j2 see
[https://github.com/shawjef3/logging-log4j2/commit/4f75053cdfe39614fc60ecc609f3658cdd4840db]
and for an example use by the scala loggers see
[https://github.com/shawjef3/logging-log4j-scala/commit/dd9a5dd2d6bef80ef4f0334c2ed7043299ddbad4].
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)