Skip to content

Commit

Permalink
MINIFICPP-1948 Add the UUID to the end of Processor and Controller Se…
Browse files Browse the repository at this point in the history
…rvice log lines

Signed-off-by: Gabor Gyimesi <gamezbird@gmail.com>

This closes #1481
  • Loading branch information
fgerlits authored and lordgamez committed Jan 17, 2023
1 parent 8a6518e commit 30fdfb7
Show file tree
Hide file tree
Showing 116 changed files with 319 additions and 353 deletions.
3 changes: 3 additions & 0 deletions conf/minifi-log.properties
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ appender.rolling.max_file_size=5242880
#appender.alert1.level=TRACE
#appender.alert1.ssl.context.service=<Name of the SSLContextService>

# Uncomment if you do not want to include the UUID of the component at the end of log lines
#logger.include.uuid=false

logger.root=INFO,rolling

#Logging configurable by namespace
Expand Down
3 changes: 3 additions & 0 deletions docker/conf/minifi-log.properties
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ appender.stderr=stderr
## The syslog appender will log using syslog(3) on *nix, and to the Windows Event Log on Windows
#appender.syslog=syslog

# Uncomment if you do not want to include the UUID of the component at the end of log lines
#logger.include.uuid=false

logger.root=INFO,stderr

#Logging configurable by namespace
Expand Down
4 changes: 2 additions & 2 deletions extensions/aws/processors/DeleteS3Object.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class DeleteS3Object : public S3Processor {
ADD_COMMON_VIRTUAL_FUNCTIONS_FOR_PROCESSORS

explicit DeleteS3Object(const std::string& name, const minifi::utils::Identifier& uuid = minifi::utils::Identifier())
: S3Processor(name, uuid, core::logging::LoggerFactory<DeleteS3Object>::getLogger()) {
: S3Processor(name, uuid, core::logging::LoggerFactory<DeleteS3Object>::getLogger(uuid)) {
}

~DeleteS3Object() override = default;
Expand All @@ -69,7 +69,7 @@ class DeleteS3Object : public S3Processor {
friend class ::S3TestsFixture<DeleteS3Object>;

explicit DeleteS3Object(std::string name, const minifi::utils::Identifier& uuid, std::unique_ptr<aws::s3::S3RequestSender> s3_request_sender)
: S3Processor(std::move(name), uuid, core::logging::LoggerFactory<DeleteS3Object>::getLogger(), std::move(s3_request_sender)) {
: S3Processor(std::move(name), uuid, core::logging::LoggerFactory<DeleteS3Object>::getLogger(uuid), std::move(s3_request_sender)) {
}

std::optional<aws::s3::DeleteObjectRequestParameters> buildDeleteS3RequestParams(
Expand Down
4 changes: 2 additions & 2 deletions extensions/aws/processors/FetchS3Object.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class FetchS3Object : public S3Processor {
ADD_COMMON_VIRTUAL_FUNCTIONS_FOR_PROCESSORS

explicit FetchS3Object(std::string name, const minifi::utils::Identifier& uuid = minifi::utils::Identifier())
: S3Processor(std::move(name), uuid, core::logging::LoggerFactory<FetchS3Object>::getLogger()) {
: S3Processor(std::move(name), uuid, core::logging::LoggerFactory<FetchS3Object>::getLogger(uuid)) {
}

~FetchS3Object() override = default;
Expand All @@ -74,7 +74,7 @@ class FetchS3Object : public S3Processor {
friend class ::S3TestsFixture<FetchS3Object>;

explicit FetchS3Object(const std::string& name, const minifi::utils::Identifier& uuid, std::unique_ptr<aws::s3::S3RequestSender> s3_request_sender)
: S3Processor(name, uuid, core::logging::LoggerFactory<FetchS3Object>::getLogger(), std::move(s3_request_sender)) {
: S3Processor(name, uuid, core::logging::LoggerFactory<FetchS3Object>::getLogger(uuid), std::move(s3_request_sender)) {
}

std::optional<aws::s3::GetObjectRequestParameters> buildFetchS3RequestParams(
Expand Down
4 changes: 2 additions & 2 deletions extensions/aws/processors/ListS3.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ class ListS3 : public S3Processor {
ADD_COMMON_VIRTUAL_FUNCTIONS_FOR_PROCESSORS

explicit ListS3(std::string name, const minifi::utils::Identifier& uuid = minifi::utils::Identifier())
: S3Processor(std::move(name), uuid, core::logging::LoggerFactory<ListS3>::getLogger()) {
: S3Processor(std::move(name), uuid, core::logging::LoggerFactory<ListS3>::getLogger(uuid)) {
}
explicit ListS3(const std::string& name, minifi::utils::Identifier uuid, std::unique_ptr<aws::s3::S3RequestSender> s3_request_sender)
: S3Processor(name, uuid, core::logging::LoggerFactory<ListS3>::getLogger(), std::move(s3_request_sender)) {
: S3Processor(name, uuid, core::logging::LoggerFactory<ListS3>::getLogger(uuid), std::move(s3_request_sender)) {
}

~ListS3() override = default;
Expand Down
4 changes: 2 additions & 2 deletions extensions/aws/processors/PutS3Object.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class PutS3Object : public S3Processor {
ADD_COMMON_VIRTUAL_FUNCTIONS_FOR_PROCESSORS

explicit PutS3Object(std::string name, const minifi::utils::Identifier& uuid = minifi::utils::Identifier())
: S3Processor(std::move(name), uuid, core::logging::LoggerFactory<PutS3Object>::getLogger()) {
: S3Processor(std::move(name), uuid, core::logging::LoggerFactory<PutS3Object>::getLogger(uuid)) {
}

~PutS3Object() override = default;
Expand Down Expand Up @@ -137,7 +137,7 @@ class PutS3Object : public S3Processor {
friend class ::S3TestsFixture<PutS3Object>;

explicit PutS3Object(const std::string& name, const minifi::utils::Identifier& uuid, std::unique_ptr<aws::s3::S3RequestSender> s3_request_sender)
: S3Processor(name, uuid, core::logging::LoggerFactory<PutS3Object>::getLogger(), std::move(s3_request_sender)) {
: S3Processor(name, uuid, core::logging::LoggerFactory<PutS3Object>::getLogger(uuid), std::move(s3_request_sender)) {
}

void fillUserMetadata(const std::shared_ptr<core::ProcessContext> &context);
Expand Down
5 changes: 2 additions & 3 deletions extensions/aws/processors/S3Processor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include "S3Processor.h"

#include <string>
#include <set>
#include <memory>
#include <utility>

Expand All @@ -35,8 +34,8 @@ S3Processor::S3Processor(std::string name, const minifi::utils::Identifier& uuid
logger_(std::move(logger)) {
}

S3Processor::S3Processor(const std::string& name, const minifi::utils::Identifier& uuid, std::shared_ptr<core::logging::Logger> logger, std::unique_ptr<aws::s3::S3RequestSender> s3_request_sender)
: core::Processor(name, uuid),
S3Processor::S3Processor(std::string name, const minifi::utils::Identifier& uuid, std::shared_ptr<core::logging::Logger> logger, std::unique_ptr<aws::s3::S3RequestSender> s3_request_sender)
: core::Processor(std::move(name), uuid),
logger_(std::move(logger)),
s3_wrapper_(std::move(s3_request_sender)) {
}
Expand Down
2 changes: 1 addition & 1 deletion extensions/aws/processors/S3Processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ class S3Processor : public core::Processor {
void onSchedule(const std::shared_ptr<core::ProcessContext> &context, const std::shared_ptr<core::ProcessSessionFactory> &sessionFactory) override;

protected:
explicit S3Processor(const std::string& name, const minifi::utils::Identifier& uuid, std::shared_ptr<core::logging::Logger> logger, std::unique_ptr<aws::s3::S3RequestSender> s3_request_sender);
explicit S3Processor(std::string name, const minifi::utils::Identifier& uuid, std::shared_ptr<core::logging::Logger> logger, std::unique_ptr<aws::s3::S3RequestSender> s3_request_sender);

std::optional<Aws::Auth::AWSCredentials> getAWSCredentialsFromControllerService(const std::shared_ptr<core::ProcessContext> &context) const;
std::optional<Aws::Auth::AWSCredentials> getAWSCredentials(const std::shared_ptr<core::ProcessContext> &context, const std::shared_ptr<core::FlowFile> &flow_file);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class AzureStorageCredentialsService : public core::controller::ControllerServic

private:
storage::AzureStorageCredentials credentials_;
std::shared_ptr<core::logging::Logger> logger_ = core::logging::LoggerFactory<AzureStorageCredentialsService>::getLogger();
std::shared_ptr<core::logging::Logger> logger_ = core::logging::LoggerFactory<AzureStorageCredentialsService>::getLogger(uuid_);
};

} // namespace org::apache::nifi::minifi::azure::controllers
4 changes: 0 additions & 4 deletions extensions/azure/processors/AzureBlobStorageProcessorBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,6 @@ class AzureBlobStorageProcessorBase : public AzureStorageProcessorBase {
});
}

explicit AzureBlobStorageProcessorBase(std::string name, const minifi::utils::Identifier& uuid, const std::shared_ptr<core::logging::Logger>& logger)
: AzureBlobStorageProcessorBase(std::move(name), uuid, logger, nullptr) {
}

void onSchedule(const std::shared_ptr<core::ProcessContext> &context, const std::shared_ptr<core::ProcessSessionFactory> &sessionFactory) override;

protected:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@ class AzureBlobStorageSingleBlobProcessorBase : public AzureBlobStorageProcessor
return utils::array_cat(AzureBlobStorageProcessorBase::properties(), std::array{Blob});
}

explicit AzureBlobStorageSingleBlobProcessorBase(std::string name, const minifi::utils::Identifier& uuid, const std::shared_ptr<core::logging::Logger>& logger)
: AzureBlobStorageSingleBlobProcessorBase(std::move(name), uuid, logger, nullptr) {
}

protected:
explicit AzureBlobStorageSingleBlobProcessorBase(
std::string name,
Expand Down
2 changes: 1 addition & 1 deletion extensions/azure/processors/DeleteAzureDataLakeStorage.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class DeleteAzureDataLakeStorage final : public AzureDataLakeStorageFileProcesso
ADD_COMMON_VIRTUAL_FUNCTIONS_FOR_PROCESSORS

explicit DeleteAzureDataLakeStorage(std::string name, const minifi::utils::Identifier& uuid = minifi::utils::Identifier())
: AzureDataLakeStorageFileProcessorBase(std::move(name), uuid, core::logging::LoggerFactory<DeleteAzureDataLakeStorage>::getLogger()) {
: AzureDataLakeStorageFileProcessorBase(std::move(name), uuid, core::logging::LoggerFactory<DeleteAzureDataLakeStorage>::getLogger(uuid)) {
}

~DeleteAzureDataLakeStorage() override = default;
Expand Down
2 changes: 1 addition & 1 deletion extensions/azure/processors/FetchAzureDataLakeStorage.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class FetchAzureDataLakeStorage final : public AzureDataLakeStorageFileProcessor
ADD_COMMON_VIRTUAL_FUNCTIONS_FOR_PROCESSORS

explicit FetchAzureDataLakeStorage(std::string name, const minifi::utils::Identifier& uuid = minifi::utils::Identifier())
: AzureDataLakeStorageFileProcessorBase(std::move(name), uuid, core::logging::LoggerFactory<FetchAzureDataLakeStorage>::getLogger()) {
: AzureDataLakeStorageFileProcessorBase(std::move(name), uuid, core::logging::LoggerFactory<FetchAzureDataLakeStorage>::getLogger(uuid)) {
}

~FetchAzureDataLakeStorage() override = default;
Expand Down
2 changes: 1 addition & 1 deletion extensions/azure/processors/ListAzureBlobStorage.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class ListAzureBlobStorage final : public AzureBlobStorageProcessorBase {
}

explicit ListAzureBlobStorage(std::string name, std::unique_ptr<storage::BlobStorageClient> blob_storage_client, const minifi::utils::Identifier& uuid = minifi::utils::Identifier())
: AzureBlobStorageProcessorBase(std::move(name), uuid, core::logging::LoggerFactory<ListAzureBlobStorage>::getLogger(), std::move(blob_storage_client)) {
: AzureBlobStorageProcessorBase(std::move(name), uuid, core::logging::LoggerFactory<ListAzureBlobStorage>::getLogger(uuid), std::move(blob_storage_client)) {
}

void initialize() override;
Expand Down
4 changes: 2 additions & 2 deletions extensions/azure/processors/ListAzureDataLakeStorage.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class ListAzureDataLakeStorage final : public AzureDataLakeStorageProcessorBase
ADD_COMMON_VIRTUAL_FUNCTIONS_FOR_PROCESSORS

explicit ListAzureDataLakeStorage(std::string name, const minifi::utils::Identifier& uuid = minifi::utils::Identifier())
: AzureDataLakeStorageProcessorBase(std::move(name), uuid, core::logging::LoggerFactory<ListAzureDataLakeStorage>::getLogger()) {
: AzureDataLakeStorageProcessorBase(std::move(name), uuid, core::logging::LoggerFactory<ListAzureDataLakeStorage>::getLogger(uuid)) {
}

~ListAzureDataLakeStorage() override = default;
Expand All @@ -77,7 +77,7 @@ class ListAzureDataLakeStorage final : public AzureDataLakeStorageProcessorBase
friend class ::ListAzureDataLakeStorageTestsFixture;

explicit ListAzureDataLakeStorage(std::string name, const minifi::utils::Identifier& uuid, std::unique_ptr<storage::DataLakeStorageClient> data_lake_storage_client)
: AzureDataLakeStorageProcessorBase(std::move(name), uuid, core::logging::LoggerFactory<ListAzureDataLakeStorage>::getLogger(), std::move(data_lake_storage_client)) {
: AzureDataLakeStorageProcessorBase(std::move(name), uuid, core::logging::LoggerFactory<ListAzureDataLakeStorage>::getLogger(uuid), std::move(data_lake_storage_client)) {
}

std::optional<storage::ListAzureDataLakeStorageParameters> buildListParameters(core::ProcessContext& context);
Expand Down
2 changes: 1 addition & 1 deletion extensions/bustache/ApplyTemplate.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class ApplyTemplate : public core::Processor {
void initialize() override;

private:
std::shared_ptr<core::logging::Logger> logger_ = core::logging::LoggerFactory<ApplyTemplate>::getLogger();
std::shared_ptr<core::logging::Logger> logger_ = core::logging::LoggerFactory<ApplyTemplate>::getLogger(uuid_);
};

} // namespace org::apache::nifi::minifi::processors
7 changes: 3 additions & 4 deletions extensions/civetweb/processors/ListenHTTP.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ class ListenHTTP : public core::Processor {
using FlowFileBufferPair = std::pair<std::shared_ptr<FlowFileRecord>, std::unique_ptr<io::BufferStream>>;

explicit ListenHTTP(std::string name, const utils::Identifier& uuid = {})
: Processor(std::move(name), uuid),
batch_size_(0) {
: Processor(std::move(name), uuid) {
callbacks_.log_message = &logMessage;
callbacks_.log_access = &logAccess;
}
Expand Down Expand Up @@ -190,12 +189,12 @@ class ListenHTTP : public core::Processor {
bool processIncomingFlowFile(core::ProcessSession &session);
bool processRequestBuffer(core::ProcessSession &session);

std::shared_ptr<core::logging::Logger> logger_ = core::logging::LoggerFactory<ListenHTTP>::getLogger();
std::shared_ptr<core::logging::Logger> logger_ = core::logging::LoggerFactory<ListenHTTP>::getLogger(uuid_);
CivetCallbacks callbacks_;
std::unique_ptr<CivetServer> server_;
std::unique_ptr<Handler> handler_;
std::string listeningPort;
uint64_t batch_size_;
uint64_t batch_size_{0};
};

} // namespace org::apache::nifi::minifi::processors
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,6 @@ class ElasticsearchCredentialsControllerService : public core::controller::Contr
private:
std::optional<std::pair<std::string, std::string>> username_password_;
std::optional<std::string> api_key_;
std::shared_ptr<core::logging::Logger> logger_ = core::logging::LoggerFactory<ElasticsearchCredentialsControllerService>::getLogger();
std::shared_ptr<core::logging::Logger> logger_ = core::logging::LoggerFactory<ElasticsearchCredentialsControllerService>::getLogger(uuid_);
};
} // namespace org::apache::nifi::minifi::extensions::elasticsearch
2 changes: 1 addition & 1 deletion extensions/elasticsearch/PostElasticsearch.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class PostElasticsearch : public core::Processor {
std::string host_url_;
std::shared_ptr<ElasticsearchCredentialsControllerService> credentials_service_;
curl::HTTPClient client_;
std::shared_ptr<core::logging::Logger> logger_ = core::logging::LoggerFactory<PostElasticsearch>::getLogger();
std::shared_ptr<core::logging::Logger> logger_ = core::logging::LoggerFactory<PostElasticsearch>::getLogger(uuid_);
};

} // namespace org::apache::nifi::minifi::extensions::elasticsearch
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,6 @@ class GCPCredentialsControllerService : public core::controller::ControllerServi


std::shared_ptr<google::cloud::storage::oauth2::Credentials> credentials_;
std::shared_ptr<core::logging::Logger> logger_ = core::logging::LoggerFactory<GCPCredentialsControllerService>::getLogger();
std::shared_ptr<core::logging::Logger> logger_ = core::logging::LoggerFactory<GCPCredentialsControllerService>::getLogger(uuid_);
};
} // namespace org::apache::nifi::minifi::extensions::gcp
2 changes: 1 addition & 1 deletion extensions/gcp/processors/DeleteGCSObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ namespace org::apache::nifi::minifi::extensions::gcp {
class DeleteGCSObject : public GCSProcessor {
public:
explicit DeleteGCSObject(std::string name, const utils::Identifier& uuid = {})
: GCSProcessor(std::move(name), uuid, core::logging::LoggerFactory<DeleteGCSObject>::getLogger()) {
: GCSProcessor(std::move(name), uuid, core::logging::LoggerFactory<DeleteGCSObject>::getLogger(uuid)) {
}
~DeleteGCSObject() override = default;

Expand Down
2 changes: 1 addition & 1 deletion extensions/gcp/processors/FetchGCSObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ namespace org::apache::nifi::minifi::extensions::gcp {
class FetchGCSObject : public GCSProcessor {
public:
explicit FetchGCSObject(std::string name, const utils::Identifier& uuid = {})
: GCSProcessor(std::move(name), uuid, core::logging::LoggerFactory<FetchGCSObject>::getLogger()) {
: GCSProcessor(std::move(name), uuid, core::logging::LoggerFactory<FetchGCSObject>::getLogger(uuid)) {
}
~FetchGCSObject() override = default;

Expand Down
2 changes: 1 addition & 1 deletion extensions/gcp/processors/ListGCSBucket.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ namespace org::apache::nifi::minifi::extensions::gcp {
class ListGCSBucket : public GCSProcessor {
public:
explicit ListGCSBucket(std::string name, const utils::Identifier& uuid = {})
: GCSProcessor(std::move(name), uuid, core::logging::LoggerFactory<ListGCSBucket>::getLogger()) {
: GCSProcessor(std::move(name), uuid, core::logging::LoggerFactory<ListGCSBucket>::getLogger(uuid)) {
}
~ListGCSBucket() override = default;

Expand Down
2 changes: 1 addition & 1 deletion extensions/gcp/processors/PutGCSObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class PutGCSObject : public GCSProcessor {
(PUBLIC_READ_WRITE, "publicReadWrite"));

explicit PutGCSObject(std::string name, const utils::Identifier& uuid = {})
: GCSProcessor(std::move(name), uuid, core::logging::LoggerFactory<PutGCSObject>::getLogger()) {
: GCSProcessor(std::move(name), uuid, core::logging::LoggerFactory<PutGCSObject>::getLogger(uuid)) {
}
~PutGCSObject() override = default;

Expand Down
2 changes: 1 addition & 1 deletion extensions/gps/GetGPS.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class GetGPS : public core::Processor {
std::string gpsdHost_;
std::string gpsdPort_;
int64_t gpsdWaitTime_;
std::shared_ptr<core::logging::Logger> logger_ = core::logging::LoggerFactory<GetGPS>::getLogger();
std::shared_ptr<core::logging::Logger> logger_ = core::logging::LoggerFactory<GetGPS>::getLogger(uuid_);
};

} // namespace org::apache::nifi::minifi::processors
2 changes: 1 addition & 1 deletion extensions/http-curl/processors/InvokeHTTP.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ class InvokeHTTP : public core::Processor {

InvalidHTTPHeaderFieldHandlingOption invalid_http_header_field_handling_strategy_;

std::shared_ptr<core::logging::Logger> logger_{core::logging::LoggerFactory<InvokeHTTP>::getLogger()};
std::shared_ptr<core::logging::Logger> logger_{core::logging::LoggerFactory<InvokeHTTP>::getLogger(uuid_)};
std::shared_ptr<utils::ResourceQueue<extensions::curl::HTTPClient>> client_queue_;
};

Expand Down
4 changes: 2 additions & 2 deletions extensions/jni/ExecuteJavaControllerService.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class ExecuteJavaControllerService : public ConfigurationContext, public std::en

try {
if (!onEnabledName.first.empty())
current_cs_class.callVoidMethod(env, clazzInstance, onEnabledName.first.c_str(), onEnabledName.second);
current_cs_class.callVoidMethod(env, clazzInstance, onEnabledName.first, onEnabledName.second);
} catch (std::runtime_error &re) {
// this is avoidable.
}
Expand Down Expand Up @@ -133,7 +133,7 @@ class ExecuteJavaControllerService : public ConfigurationContext, public std::en

std::string class_name_;

std::shared_ptr<core::logging::Logger> logger_ = core::logging::LoggerFactory<ExecuteJavaControllerService>::getLogger();
std::shared_ptr<core::logging::Logger> logger_ = core::logging::LoggerFactory<ExecuteJavaControllerService>::getLogger(uuid_);
};

} // namespace org::apache::nifi::minifi::jni::controllers
2 changes: 1 addition & 1 deletion extensions/jni/jvm/JavaControllerService.h
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ class JavaControllerService : public core::controller::ControllerService, public

JVMLoader *loader = nullptr;

std::shared_ptr<core::logging::Logger> logger_ = core::logging::LoggerFactory<JavaControllerService>::getLogger();
std::shared_ptr<core::logging::Logger> logger_ = core::logging::LoggerFactory<JavaControllerService>::getLogger(uuid_);
};

} // namespace org::apache::nifi::minifi::jni::controllers
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const core::Property KubernetesControllerService::ContainerNameFilter{

KubernetesControllerService::KubernetesControllerService(const std::string& name, const utils::Identifier& uuid)
: AttributeProviderService(name, uuid),
logger_{core::logging::LoggerFactory<KubernetesControllerService>::getLogger()} {
logger_{core::logging::LoggerFactory<KubernetesControllerService>::getLogger(uuid)} {
}

KubernetesControllerService::KubernetesControllerService(const std::string& name, const std::shared_ptr<Configure>& configuration)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class CollectKubernetesPodMetrics : public core::Processor {
void onTrigger(const std::shared_ptr<core::ProcessContext>& context, const std::shared_ptr<core::ProcessSession>& session) override;

private:
gsl::not_null<std::shared_ptr<core::logging::Logger>> logger_ = gsl::make_not_null(core::logging::LoggerFactory<CollectKubernetesPodMetrics>::getLogger());
gsl::not_null<std::shared_ptr<core::logging::Logger>> logger_ = gsl::make_not_null(core::logging::LoggerFactory<CollectKubernetesPodMetrics>::getLogger(uuid_));
std::shared_ptr<controllers::KubernetesControllerService> kubernetes_controller_service_;
};

Expand Down

0 comments on commit 30fdfb7

Please sign in to comment.