mirror of
https://github.com/apple/swift-log
synced 2026-11-25 03:57:48 +00:00
fix a few typos in comments (#28)
This commit is contained in:
1 parent
b96c0e2b61
commit
d370d101be
2 files changed
+7
-7
No files matched your search
@@ -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)
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user