[skeleton] Make example logging compliant to Coding Guidelines (#1646)
See https://www.openhab.org/docs/developer/guidelines.html#f-logging point 4 Also give an example for the logging severities, as many binding PRs log to info or error. Signed-off-by: Fabian Wolter <github@fabian-wolter.de>pull/1647/head
parent
57d4487f36
commit
39d6986df7
|
@ -63,7 +63,6 @@ public class ${bindingIdCamelCase}Handler extends BaseThingHandler {
|
|||
|
||||
@Override
|
||||
public void initialize() {
|
||||
// logger.debug("Start initializing!");
|
||||
config = getConfigAs(${bindingIdCamelCase}Configuration.class);
|
||||
|
||||
// TODO: Initialize the handler.
|
||||
|
@ -90,7 +89,10 @@ public class ${bindingIdCamelCase}Handler extends BaseThingHandler {
|
|||
}
|
||||
});
|
||||
|
||||
// logger.debug("Finished initializing!");
|
||||
// These logging types should be primarily used by bindings
|
||||
// logger.trace("Example trace message");
|
||||
// logger.debug("Example debug message");
|
||||
// logger.warn("Example warn message");
|
||||
|
||||
// Note: When initialization can NOT be done set the status with more details for further
|
||||
// analysis. See also class ThingStatusDetail for all available status details.
|
||||
|
|
Loading…
Reference in New Issue