Re: logger variable casing?
"Wim Deblauwe" <[email protected]> Fri, 12 Sep 2008 16:00:11 +0200
| Newsgroups | gmane.comp.java.audit.checkstyle.user |
|---|---|
| Message-ID | <[email protected]> |
Good tip, thanks! 2008/9/12 Armstrong, Conrad <[email protected]> > We had the same desire to use "logger" variables, so we just altered the > format property of the ConstantName check to allow it: > > <module name="ConstantName"> > <!-- This changes the default check for static finals by > allowing "logger" as an exception. --> > <property name="format" > value="^([A-Z][A-Z0-9]*(_[A-Z0-9]+)*|logger)$"/> > </module> > > > -----Original Message----- > Message: 1 > Date: Thu, 11 Sep 2008 23:36:18 -0700 (PDT) > From: Wim Deblauwe <[email protected]> > Subject: [Checkstyle-user] logger variable casing? > To: [email protected] > Message-ID: <[email protected]> > Content-Type: text/plain; charset=us-ascii > > > Hi, > > I just started with checkstyle and I have a small question. > > How do people cope with the logger variable (member) in their classes? > If > you use the standard sun checks, you need to use this: > > public MyClass > { > private static final Logger LOGGER = Logger.getLogger( MyClass.class > ); > } > > since static final members are regarded a constant and need to be all > uppercase. > > However, I see lots of people using lower case 'logger' or 'log' in > stead. > How did you configure checkstyle for this? Or are you forcing to the > uppercase form? > > I would be glad to hear your thoughts on this. > > regards, > > Wim > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Checkstyle-user mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/checkstyle-user > ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Checkstyle-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/checkstyle-user