vy opened a new issue, #3895: URL: https://github.com/apache/logging-log4j2/issues/3895
JTL documentation should we reworded to explain valid use cases of `PatternLayout` fallback, instead of completely banishing it. ### Discussed in https://github.com/apache/logging-log4j2/discussions/3890 <div type='discussions-op-text'> <sup>Originally posted by **amosshi** August 20, 2025</sup> In the [JSON Template Layout document](https://logging.apache.org/log4j/2.x/manual/json-template-layout.html#event-template-resolver-pattern) it reads: > If you find yourself using pattern, it is highly likely you are either doing something wrong, or JSON Template Layout needs some improvement. ### The Problem In today, JSON Template Layout has no way to generate logger Class Name **without the Java package** ``` logger event template grammar config = "field" -> ( "name" | "fqcn" ) ``` Well usually the Java package is too long and we want to skip it to save disk space, especially for a high traffic data center. ### The Pattern Solution In Pattern layout we can achieve it easily via `"%c{1}` , while there is no such option in JSON Template Layout unfortunately. ```json "logger": { "$resolver": "pattern", "pattern": "%c{1}", } ``` ### The Idea How about add a new option for logger, like `shortName`, which only generate the class name without the package. </div> -- 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]
