2 * Copyright (c) 2010-2022 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
7 * This program and the accompanying materials are made available under the
8 * terms of the Eclipse Public License 2.0 which is available at
9 * http://www.eclipse.org/legal/epl-2.0
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.binding.neeo.internal.net;
15 import java.util.Objects;
16 import java.util.logging.LogRecord;
18 import org.eclipse.jdt.annotation.NonNullByDefault;
19 import org.eclipse.jdt.annotation.Nullable;
20 import org.slf4j.Logger;
23 * Logging adapter to use for Slf4j
25 * @author Tim Roberts - Initial Contribution
28 class Slf4LoggingAdapter extends java.util.logging.Logger {
31 private final Logger logger;
34 * Creates the logging adapter from the given logger
36 * @param logger a non-null logger to use
38 protected Slf4LoggingAdapter(Logger logger) {
39 super("jersey", null);
40 Objects.requireNonNull(logger, "logger cannot be null");
45 public void log(@Nullable LogRecord record) {
46 logger.debug("{}", record == null ? "" : record.getMessage());