From d370d101bed7fa4618a7a4a6d1b2e9706aba6b2f Mon Sep 17 00:00:00 2001 From: Konrad `ktoso` Malawski Date: Thu, 17 Jan 2019 20:07:19 +0900 Subject: [PATCH] fix a few typos in comments (#28) --- Sources/Logging/Locks.swift | 4 ++-- Tests/LoggingTests/TestLogger.swift | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Sources/Logging/Locks.swift b/Sources/Logging/Locks.swift index 7c471cc..5e14d78 100644 --- a/Sources/Logging/Locks.swift +++ b/Sources/Logging/Locks.swift @@ -35,7 +35,7 @@ internal final class Lock { /// Release the lock. /// - /// Whenver possible, consider using `withLock` instead of this method and + /// Whenever possible, consider using `withLock` instead of this method and /// `lock`, to simplify lock handling. public func unlock() { let err = pthread_mutex_unlock(self.mutex) @@ -108,7 +108,7 @@ internal final class ReadWriteLock { /// Release the lock. /// - /// Whenver possible, consider using `withLock` instead of this method and + /// Whenever possible, consider using `withLock` instead of this method and /// `lock`, to simplify lock handling. public func unlock() { let err = pthread_rwlock_unlock(self.rwlock) diff --git a/Tests/LoggingTests/TestLogger.swift b/Tests/LoggingTests/TestLogger.swift index a3db88c..9a6f520 100644 --- a/Tests/LoggingTests/TestLogger.swift +++ b/Tests/LoggingTests/TestLogger.swift @@ -3,8 +3,8 @@ import Foundation import XCTest internal struct TestLogging { - private let _config = Config() // shared amonog loggers - private let recorder = Recorder() // shared amonog loggers + private let _config = Config() // shared among loggers + private let recorder = Recorder() // shared among loggers func make(label: String) -> LogHandler { return TestLogger(label: label, config: self.config, recorder: self.recorder) @@ -19,7 +19,7 @@ internal struct TestLogger: LogHandler { private let metadataLock = NSLock() private let recorder: Recorder private let config: Config - private var logger: Logger // the actual loggger + private var logger: Logger // the actual logger let label: String init(label: String, config: Config, recorder: Recorder) { @@ -67,7 +67,7 @@ internal struct TestLogger: LogHandler { } } - // TODO: would be nice to deleagte to local copy of logger but StdoutLogger is a reference type. why? + // TODO: would be nice to delegate to local copy of logger but StdoutLogger is a reference type. why? subscript(metadataKey metadataKey: Logging.Metadata.Key) -> Logging.Metadata.Value? { get { // return self.logger[metadataKey: metadataKey] @@ -268,7 +268,7 @@ internal struct TestLibrary { } public func doSomethingAsync(completion: @escaping () -> Void) { - // libraries that use global loggers and async, need to make sure they propogate the + // libraries that use global loggers and async, need to make sure they propagate the // logging metadata when creating a new thread let metadata = MDC.global.metadata queue.asyncAfter(deadline: .now() + 0.1) {