@@ -16,7 +16,7 @@ import SmithyIdentity
1616
1717/// A closure for customizing the underlying `CloudWatchLogsClient` configuration.
1818@_spi ( AmplifyExperimental)
19- public typealias AmplifyCloudWatchLoggingClientConfigurationProvider = (
19+ public typealias AmplifyCloudWatchClientConfigurationProvider = (
2020 inout AWSCloudWatchLogs . CloudWatchLogsClient . CloudWatchLogsClientConfig
2121) -> Void
2222
@@ -35,7 +35,7 @@ public typealias AmplifyCloudWatchLoggingClientConfigurationProvider = (
3535///
3636/// Example usage:
3737/// ```swift
38- /// let loggingClient = AmplifyCloudWatchLoggingClient (
38+ /// let loggingClient = AmplifyCloudWatchClient (
3939/// region: "us-east-1",
4040/// credentialsProvider: credentialsProvider,
4141/// options: .init(logGroupName: "/app/my-ios-app")
@@ -51,7 +51,7 @@ public typealias AmplifyCloudWatchLoggingClientConfigurationProvider = (
5151/// ```
5252@available ( iOS 13 . 0 , macOS 12 . 0 , tvOS 13 . 0 , watchOS 9 . 0 , * )
5353@_spi ( AmplifyExperimental)
54- public final class AmplifyCloudWatchLoggingClient : AmplifyFoundation . LogSinkBehavior , @unchecked Sendable {
54+ public final class AmplifyCloudWatchClient : AmplifyFoundation . LogSinkBehavior , @unchecked Sendable {
5555
5656 private var enabled : Bool = true
5757
@@ -64,7 +64,7 @@ public final class AmplifyCloudWatchLoggingClient: AmplifyFoundation.LogSinkBeha
6464 private let logFilter : CloudWatchLoggingFilter
6565 private var userIdentifier : String ?
6666 private let networkMonitor : LoggingNetworkMonitor
67- private let logger = AmplifyFoundation . AmplifyLogging. logger ( for: AmplifyCloudWatchLoggingClient . self)
67+ private let logger = AmplifyFoundation . AmplifyLogging. logger ( for: AmplifyCloudWatchClient . self)
6868 private let eventSubject = PassthroughSubject < LoggingEvent , Never > ( )
6969 private let cloudWatchClient : CloudWatchLogsClientProtocol
7070
@@ -88,20 +88,20 @@ public final class AmplifyCloudWatchLoggingClient: AmplifyFoundation.LogSinkBeha
8888 controller. log ( message. level, message. content, message. error)
8989 }
9090
91- /// Configuration options for AmplifyCloudWatchLoggingClient .
91+ /// Configuration options for AmplifyCloudWatchClient .
9292 public struct Options {
9393 public let logGroupName : String
9494 public let localStoreMaxSizeInMB : Int
9595 public let flushStrategy : FlushStrategy
9696 public let loggingConstraints : LoggingConstraints
97- public let configureClient : AmplifyCloudWatchLoggingClientConfigurationProvider ?
97+ public let configureClient : AmplifyCloudWatchClientConfigurationProvider ?
9898
9999 public init (
100100 logGroupName: String ,
101101 localStoreMaxSizeInMB: Int = 5 ,
102102 flushStrategy: FlushStrategy = . interval( ) ,
103103 loggingConstraints: LoggingConstraints = LoggingConstraints ( ) ,
104- configureClient: AmplifyCloudWatchLoggingClientConfigurationProvider ? = nil
104+ configureClient: AmplifyCloudWatchClientConfigurationProvider ? = nil
105105 ) {
106106 self . logGroupName = logGroupName
107107 self . localStoreMaxSizeInMB = localStoreMaxSizeInMB
@@ -111,7 +111,7 @@ public final class AmplifyCloudWatchLoggingClient: AmplifyFoundation.LogSinkBeha
111111 }
112112 }
113113
114- /// Initializes a new AmplifyCloudWatchLoggingClient instance.
114+ /// Initializes a new AmplifyCloudWatchClient instance.
115115 public init (
116116 region: String ,
117117 credentialsProvider: any AmplifyFoundation . AWSCredentialsProvider ,
@@ -185,7 +185,7 @@ public final class AmplifyCloudWatchLoggingClient: AmplifyFoundation.LogSinkBeha
185185 /// Returns the underlying AWS CloudWatch Logs SDK client.
186186 public func getCloudWatchLogsClient( ) throws -> AWSCloudWatchLogs . CloudWatchLogsClient {
187187 guard let client = cloudWatchClient as? AWSCloudWatchLogs . CloudWatchLogsClient else {
188- throw CloudWatchLoggingError . configuration (
188+ throw CloudWatchError . configuration (
189189 " CloudWatch Logs client is not the expected type " ,
190190 " This is an internal error. Please file a bug report. "
191191 )
@@ -267,7 +267,7 @@ private extension NSLock {
267267// MARK: - CloudWatchLoggingMonitorDelegate
268268
269269@available ( iOS 13 . 0 , macOS 12 . 0 , tvOS 13 . 0 , watchOS 9 . 0 , * )
270- extension AmplifyCloudWatchLoggingClient : CloudWatchLoggingMonitorDelegate {
270+ extension AmplifyCloudWatchClient : CloudWatchLoggingMonitorDelegate {
271271 func handleAutomaticFlushIntervalEvent( ) {
272272 Task { [ weak self] in
273273 try await self ? . flushLogs ( )
0 commit comments