lishunli / projectlombok

Automatically exported from code.google.com/p/projectlombok
0 stars 0 forks source link

Allow variable name for @Log4j #440

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Please enable @Log4j(name="logger")

What is the expected output? What do you see instead?
Variable name used in logging is now "logger" (or whatever the user chooses) 
instead of "log".  

What version of the product are you using? On what operating system?
Latest downloaded as of 9-JAN-2012.

Please provide any additional information below.

The @Log4j is a wonderful idea, but it would be nicer not to force users to use 
"log" as the logger variable.

Original issue reported on code.google.com by gnewal...@firstfolio.com.au on 9 Jan 2013 at 2:40

GoogleCodeExporter commented 9 years ago
I would add that the default variable name for loggers should be all uppercase, 
following the Java convention for static finals.

Original comment by simioni....@gmail.com on 18 Feb 2013 at 5:05

GoogleCodeExporter commented 9 years ago
Thanks for taking the time to give us feedback.

The statement that the field should be named in upper case according to the 
java conventions is incorrect. See also the explanation in issues 
http://code.google.com/p/projectlombok/issues/detail?id=400#c1 and 
http://code.google.com/p/projectlombok/issues/detail?id=400#c1

For the time being we've decided to stick with just using `log` in order to 
keep things simpler. We like simple. Only if there are compelling reasons we 
sacrifice simplicity for flexibility. The reason "I want to specify my own name 
for my Logger because I that's what I am used to" is not compelling enough.

Unless you have a different use case that we overlooked, we will not add a 
'name' parameter.

Original comment by r.spilker on 19 Feb 2013 at 1:54

GoogleCodeExporter commented 9 years ago
Issue 530 has been merged into this issue.

Original comment by askon...@gmail.com on 6 Jun 2013 at 11:31

GoogleCodeExporter commented 9 years ago
The thing is when starting to use lombok there can be need to use rename 
refactoring for each class using "logger".

Original comment by vyachesl...@gmail.com on 10 Jun 2013 at 5:13