diff --git a/TIFoundationUtils/DataStorage/Sources/SingleValueStorage/Implementations/MigratableStorage/Container/BaseCodableMigratingStorageContainer.swift b/TIFoundationUtils/DataStorage/Sources/SingleValueStorage/Implementations/MigratableStorage/Container/BaseCodableMigratingStorageContainer.swift index 3ef52349..37f0383c 100644 --- a/TIFoundationUtils/DataStorage/Sources/SingleValueStorage/Implementations/MigratableStorage/Container/BaseCodableMigratingStorageContainer.swift +++ b/TIFoundationUtils/DataStorage/Sources/SingleValueStorage/Implementations/MigratableStorage/Container/BaseCodableMigratingStorageContainer.swift @@ -32,7 +32,7 @@ where SourceStorage: CodableKeyValueStorage, TargetStorage: CodableKeyValueStora public init(sourceStorage: SourceStorage, targetStorage: TargetStorage, - errorLogger: ErrorLogger = TIFoundationLogger(category: "BaseCodableMigratingStorageContainer")) { + errorLogger: ErrorLogger) { self.errorLogger = errorLogger diff --git a/TIFoundationUtils/DataStorage/Sources/SingleValueStorage/Implementations/MigratableStorage/MigratingSingleValueStorage.swift b/TIFoundationUtils/DataStorage/Sources/SingleValueStorage/Implementations/MigratableStorage/MigratingSingleValueStorage.swift index 11728a8a..38674f0b 100644 --- a/TIFoundationUtils/DataStorage/Sources/SingleValueStorage/Implementations/MigratableStorage/MigratingSingleValueStorage.swift +++ b/TIFoundationUtils/DataStorage/Sources/SingleValueStorage/Implementations/MigratableStorage/MigratingSingleValueStorage.swift @@ -36,7 +36,7 @@ where SourceStorage.ErrorType == TargetStorage.ErrorType, public init(sourceStorage: SourceStorage, targetStorage: TargetStorage, - errorLogger: ErrorLogger = TIFoundationLogger(category: "MigratingSingleValueStorage")) { + errorLogger: ErrorLogger) { self.sourceStorage = sourceStorage self.targetStorage = targetStorage diff --git a/TIFoundationUtils/Logger/Sources/TIFoundationLogger.swift b/TIFoundationUtils/Logger/Sources/TIFoundationLogger.swift new file mode 100644 index 00000000..dbfeb1e2 --- /dev/null +++ b/TIFoundationUtils/Logger/Sources/TIFoundationLogger.swift @@ -0,0 +1,30 @@ +// +// Copyright (c) 2023 Touch Instinct +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the Software), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// + +import TILogging +import os + +public final class TIFoundationLogger: DefaultOSLogErrorLogger { + public init(category: String) { + super.init(log: OSLog(subsystem: "TIFoundationUtils", category: category)) + } +} diff --git a/TIFoundationUtils/TIFoundationUtils.podspec b/TIFoundationUtils/TIFoundationUtils.podspec index 9e0f609b..fb0aa6ef 100644 --- a/TIFoundationUtils/TIFoundationUtils.podspec +++ b/TIFoundationUtils/TIFoundationUtils.podspec @@ -19,7 +19,7 @@ Pod::Spec.new do |s| s.exclude_files = s.name + '/*.app', '**/NefPlaygroundSupport.swift' end - s.dependency 'TISwiftUtils', s.version.to_s s.dependency 'TILogging', s.version.to_s + s.dependency 'TISwiftUtils', s.version.to_s s.framework = 'Foundation' end