errael commented on code in PR #8253:
URL: https://github.com/apache/netbeans/pull/8253#discussion_r2017715060
##########
java/java.editor/src/org/netbeans/modules/java/editor/codegen/LoggerGenerator.java:
##########
@@ -152,15 +164,65 @@ public void run(WorkingCopy copy) throws IOException {
}
}
+ public static String getBaseLoggerName() {
+ // Undocumented feature/property subject to change/removal. Need a UI.
+ String name = System.getProperty("LOGGER_GENERATOR_BASE_LOGGER_NAME");
+ return name == null ? "LOG" : name;
+ }
Review Comment:
"use case": Loggers in a project are declared with a name other than "LOG".
This is mentioned in #8240. I'll get rid of the property and leave the method.
Currently the word "LOG" is used literally in a few places; this is a cleanup.
A method eases future logging UI extensions. When/if this PR is accepted, I'll
adjust #8240 since there will still be logging features to consider.
BTW, using "LOG" violates recommended java style since a logger has mutable
state. See
https://stackoverflow.com/questions/1417190/should-a-static-final-logger-be-declared-in-upper-case
and https://google.github.io/styleguide/javaguide.html#s5.2.4-constant-names
which has a lower case logger name as an example.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists