Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Eclipse SmartHome » Loggers: static or non-static?
Loggers: static or non-static? [message #1750860] Fri, 30 December 2016 08:51 Go to next message
Jan N. Klug is currently offline Jan N. KlugFriend
Messages: 4
Registered: December 2016
Junior Member
Hi.

The coding guidelines https://www.eclipse.org/smarthome/documentation/development/guidelines.html state in C.3:

Quote:

For logging, slf4j (v1.7.2) is used with non-static loggers.


Looking through the code most loggers are defined as
private static final
.

What is the right way to go?

Best Regards,

-jnk
Re: Loggers: static or non-static? [message #1750862 is a reply to message #1750860] Fri, 30 December 2016 08:53 Go to previous messageGo to next message
Kai Kreuzer is currently offline Kai KreuzerFriend
Messages: 673
Registered: December 2011
Senior Member
The guideline is right.

>Looking through the code most loggers are defined as static

Could you give a reference? Afair, we fixed all of them (here in the ESH repo) a while ago.
Re: Loggers: static or non-static? [message #1750863 is a reply to message #1750862] Fri, 30 December 2016 09:27 Go to previous messageGo to next message
Jan N. Klug is currently offline Jan N. KlugFriend
Messages: 4
Registered: December 2016
Junior Member
The first one i opened was

https://github.com/eclipse/smarthome/blob/master/bundles/automation/org.eclipse.smarthome.automation.module.core/src/main/java/org/eclipse/smarthome/automation/module/core/handler/RuleEnableHandler.java

l. 60

You are right, the other I found are not in the ESH repo.

Best Regards,

-jnk
Re: Loggers: static or non-static? [message #1753346 is a reply to message #1750863] Sat, 04 February 2017 09:52 Go to previous message
Markus Rathgeb is currently offline Markus RathgebFriend
Messages: 105
Registered: August 2014
Senior Member

I have created https://github.com/eclipse/smarthome/pull/2971 for the fix of RuleEnableHandler
Previous Topic:Change thing parameters from a rule
Next Topic:Auto Install ESH Bundles After Fresh installation/update
Goto Forum:
  


Current Time: Thu Apr 25 23:12:09 GMT 2024

Powered by FUDForum. Page generated in 0.05815 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top