Skip to content

Commit

Permalink
Fix logging in AbstractProvider implementations (openhab#3751)
Browse files Browse the repository at this point in the history
Signed-off-by: Jan N. Klug <[email protected]>
  • Loading branch information
J-N-K authored Aug 13, 2023
1 parent da73b57 commit 3af2e30
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@
import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Deactivate;
import org.osgi.service.component.annotations.Reference;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* This class is the central part of the persistence management and delegation. It reads the persistence
Expand All @@ -70,6 +72,7 @@
@NonNullByDefault
public class PersistenceModelManager extends AbstractProvider<PersistenceServiceConfiguration>
implements ModelRepositoryChangeListener, PersistenceServiceConfigurationProvider {
private final Logger logger = LoggerFactory.getLogger(PersistenceModelManager.class);
private final Map<String, PersistenceServiceConfiguration> configurations = new ConcurrentHashMap<>();
private final ModelRepository modelRepository;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
import org.openhab.core.thing.link.ItemChannelLink;
import org.openhab.core.thing.link.ItemChannelLinkProvider;
import org.osgi.service.component.annotations.Component;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* {@link GenericItemChannelLinkProvider} link items to channel by reading bindings with type "channel".
Expand All @@ -43,6 +45,7 @@
public class GenericItemChannelLinkProvider extends AbstractProvider<ItemChannelLink>
implements BindingConfigReader, ItemChannelLinkProvider {

private final Logger logger = LoggerFactory.getLogger(GenericItemChannelLinkProvider.class);
/** caches binding configurations. maps itemNames to {@link BindingConfig}s */
protected Map<String, Set<ItemChannelLink>> itemChannelLinkMap = new ConcurrentHashMap<>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ private enum EventType {
UPDATED
}

protected final Logger logger = LoggerFactory.getLogger(AbstractProvider.class);
private Logger logger = LoggerFactory.getLogger(AbstractProvider.class);
protected List<ProviderChangeListener<E>> listeners = new CopyOnWriteArrayList<>();

@Override
Expand Down

0 comments on commit 3af2e30

Please sign in to comment.