Mercurial > hg > orthanc-object-storage
changeset 79:16514270d9ca
fix
author | Alain Mazy <am@osimis.io> |
---|---|
date | Fri, 14 Oct 2022 16:22:26 +0200 |
parents | d7295e8678d7 |
children | b3787f4aa16a |
files | Azure/AzureBlobStoragePlugin.cpp Azure/AzureBlobStoragePlugin.h Google/GoogleStoragePlugin.cpp Google/GoogleStoragePlugin.h |
diffstat | 4 files changed, 14 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/Azure/AzureBlobStoragePlugin.cpp Fri Oct 14 11:00:18 2022 +0200 +++ b/Azure/AzureBlobStoragePlugin.cpp Fri Oct 14 16:22:26 2022 +0200 @@ -41,7 +41,8 @@ public: - AzureBlobStoragePlugin(const as::cloud_blob_client& blobClient, + AzureBlobStoragePlugin(const std::string& nameForLogs, + const as::cloud_blob_client& blobClient, const as::cloud_blob_container& blobContainer, bool enableLegacyStorageStructure, bool storageContainsUnknownFiles @@ -196,7 +197,7 @@ return false; } -IStorage* AzureBlobStoragePluginFactory::CreateStorage(const OrthancPlugins::OrthancConfiguration& orthancConfig) +IStorage* AzureBlobStoragePluginFactory::CreateStorage(const std::string& nameForLogs, const OrthancPlugins::OrthancConfiguration& orthancConfig) { std::string connectionString; std::string containerName; @@ -303,7 +304,7 @@ OrthancPlugins::LogInfo("Blob storage initialized"); - return new AzureBlobStoragePlugin(blobClient, blobContainer, enableLegacyStorageStructure, storageContainsUnknownFiles); + return new AzureBlobStoragePlugin(nameForLogs, blobClient, blobContainer, enableLegacyStorageStructure, storageContainsUnknownFiles); } catch (const std::exception& e) { @@ -313,8 +314,8 @@ } -AzureBlobStoragePlugin::AzureBlobStoragePlugin(const as::cloud_blob_client& blobClient, const as::cloud_blob_container& blobContainer, bool enableLegacyStorageStructure, bool storageContainsUnknownFiles) - : BaseStorage(enableLegacyStorageStructure), +AzureBlobStoragePlugin::AzureBlobStoragePlugin(const std::string& nameForLogs, const as::cloud_blob_client& blobClient, const as::cloud_blob_container& blobContainer, bool enableLegacyStorageStructure, bool storageContainsUnknownFiles) + : BaseStorage(nameForLogs, enableLegacyStorageStructure), blobClient_(blobClient), blobContainer_(blobContainer), storageContainsUnknownFiles_(storageContainsUnknownFiles)
--- a/Azure/AzureBlobStoragePlugin.h Fri Oct 14 11:00:18 2022 +0200 +++ b/Azure/AzureBlobStoragePlugin.h Fri Oct 14 16:22:26 2022 +0200 @@ -25,5 +25,5 @@ { public: static const char* GetStoragePluginName(); - static IStorage* CreateStorage(const OrthancPlugins::OrthancConfiguration& orthancConfig); + static IStorage* CreateStorage(const std::string& nameForLogs, const OrthancPlugins::OrthancConfiguration& orthancConfig); };
--- a/Google/GoogleStoragePlugin.cpp Fri Oct 14 11:00:18 2022 +0200 +++ b/Google/GoogleStoragePlugin.cpp Fri Oct 14 16:22:26 2022 +0200 @@ -36,7 +36,8 @@ public: - GoogleStoragePlugin(const std::string& bucketName, + GoogleStoragePlugin(const std::string& nameForLogs, + const std::string& bucketName, google::cloud::storage::Client& mainClient, bool enableLegacyStorageStructure, bool storageContainsUnknownFiles @@ -234,7 +235,7 @@ return "Google Cloud Storage"; } -IStorage* GoogleStoragePluginFactory::CreateStorage(const OrthancPlugins::OrthancConfiguration& orthancConfig) +IStorage* GoogleStoragePluginFactory::CreateStorage(const std::string& nameForLogs, const OrthancPlugins::OrthancConfiguration& orthancConfig) { bool enableLegacyStorageStructure; bool storageContainsUnknownFiles; @@ -285,11 +286,11 @@ return nullptr; } - return new GoogleStoragePlugin(googleBucketName, mainClient.value(), enableLegacyStorageStructure, storageContainsUnknownFiles); + return new GoogleStoragePlugin(nameForLogs, googleBucketName, mainClient.value(), enableLegacyStorageStructure, storageContainsUnknownFiles); } -GoogleStoragePlugin::GoogleStoragePlugin(const std::string &bucketName, google::cloud::storage::Client& mainClient, bool enableLegacyStorageStructure, bool storageContainsUnknownFiles) - : BaseStorage(enableLegacyStorageStructure), +GoogleStoragePlugin::GoogleStoragePlugin(const std::string& nameForLogs, const std::string &bucketName, google::cloud::storage::Client& mainClient, bool enableLegacyStorageStructure, bool storageContainsUnknownFiles) + : BaseStorage(nameForLogs, enableLegacyStorageStructure), bucketName_(bucketName), mainClient_(mainClient), storageContainsUnknownFiles_(storageContainsUnknownFiles)
--- a/Google/GoogleStoragePlugin.h Fri Oct 14 11:00:18 2022 +0200 +++ b/Google/GoogleStoragePlugin.h Fri Oct 14 16:22:26 2022 +0200 @@ -27,5 +27,5 @@ { public: static const char* GetStoragePluginName(); - static IStorage* CreateStorage(const OrthancPlugins::OrthancConfiguration& orthancConfig); + static IStorage* CreateStorage(const std::string& nameForLogs, const OrthancPlugins::OrthancConfiguration& orthancConfig); };