Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added the logger class to fix the logging warnings #193

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
import org.apache.kafka.clients.consumer.KafkaConsumer;
import org.apache.kafka.common.PartitionInfo;
import org.apache.kafka.common.TopicPartition;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.sourcelab.kafka.webview.ui.manager.kafka.config.ClientConfig;
import org.sourcelab.kafka.webview.ui.manager.kafka.config.RecordFilterDefinition;
import org.sourcelab.kafka.webview.ui.manager.kafka.filter.RecordFilterInterceptor;
Expand All @@ -41,6 +43,8 @@
* Factory class for creating new KafkaConsumers.
*/
public class KafkaConsumerFactory {

private static final Logger logger = LoggerFactory.getLogger(KafkaConsumerFactory.class);
/**
* Utility class for setting up common kafka client properties.
*/
Expand Down Expand Up @@ -137,6 +141,7 @@ private Map<String, Object> buildConsumerConfig(final ClientConfig clientConfig)
if (configMap.containsKey(entry.getKey())) {
continue;
}
logger.warn("Setting property {} value to {}", entry.getKey(), entry.getValue());
configMap.put(entry.getKey(), entry.getValue());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
package org.sourcelab.kafka.webview.ui.manager.kafka.config;

import org.apache.kafka.common.serialization.Deserializer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.Collections;
import java.util.HashMap;
Expand All @@ -34,6 +36,9 @@
* Configuration defining how to Deserialize values from Kafka.
*/
public class DeserializerConfig {

private static final Logger logger = LoggerFactory.getLogger(DeserializerConfig.class);

private final Class<? extends Deserializer> keyDeserializerClass;
private final Map<String, String> keyDeserializerOptions;

Expand Down Expand Up @@ -89,6 +94,7 @@ public Map<String, String> getMergedOptions() {
final Map<String, String> mergedOptions = new HashMap<>();
mergedOptions.putAll(getKeyDeserializerOptions());
mergedOptions.putAll(getValueDeserializerOptions());
logger.warn("Merged options are {}", mergedOptions);
return mergedOptions;
}

Expand Down