Skip to content

Commit

Permalink
Merge pull request #303 from orlandos-nl/logger-label-update
Browse files Browse the repository at this point in the history
Update logger label
  • Loading branch information
Joannis authored Jan 12, 2023
2 parents 4e8e84d + bb9075a commit 8b33fd0
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Sources/MongoClient/Cluster.swift
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ public final class MongoCluster: MongoConnectionPool, @unchecked Sendable {
/// ```
public convenience init(
lazyConnectingTo settings: ConnectionSettings,
logger: Logger = Logger(label: "org.openkitten.mongokitten.cluster"),
logger: Logger = Logger(label: "org.orlandos-nl.mongokitten.cluster"),
eventLoopGroup: _MongoPlatformEventLoopGroup = MongoCluster._newEventLoopGroup()
) throws {
guard settings.hosts.count > 0 else {
Expand Down Expand Up @@ -187,7 +187,7 @@ public final class MongoCluster: MongoConnectionPool, @unchecked Sendable {
public convenience init(
connectingTo settings: ConnectionSettings,
allowFailure: Bool = false,
logger: Logger = Logger(label: "org.openkitten.mongokitten.cluster"),
logger: Logger = Logger(label: "org.orlandos-nl.mongokitten.cluster"),
eventLoopGroup: _MongoPlatformEventLoopGroup = MongoCluster._newEventLoopGroup()
) async throws {
guard settings.hosts.count > 0 else {
Expand Down
6 changes: 3 additions & 3 deletions Sources/MongoClient/Connection.swift
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public final actor MongoConnection: @unchecked Sendable {
public var isMetricsEnabled = false {
didSet {
if isMetricsEnabled, !oldValue {
queryTimer = Metrics.Timer(label: "org.openkitten.mongokitten.core.queries")
queryTimer = Metrics.Timer(label: "org.orlandos-nl.mongokitten.core.queries")
} else {
queryTimer = nil
}
Expand Down Expand Up @@ -123,7 +123,7 @@ public final actor MongoConnection: @unchecked Sendable {
/// - Returns: A connection to the MongoDB server
public static func connect(
settings: ConnectionSettings,
logger: Logger = Logger(label: "org.openkitten.mongokitten.connection"),
logger: Logger = Logger(label: "org.orlandos-nl.mongokitten.connection"),
resolver: Resolver? = nil,
clientDetails: MongoClientDetails? = nil
) async throws -> MongoConnection {
Expand All @@ -136,7 +136,7 @@ public final actor MongoConnection: @unchecked Sendable {

internal static func connect(
settings: ConnectionSettings,
logger: Logger = Logger(label: "org.openkitten.mongokitten.connection"),
logger: Logger = Logger(label: "org.orlandos-nl.mongokitten.connection"),
onGroup group: _MongoPlatformEventLoopGroup,
resolver: Resolver? = nil,
clientDetails: MongoClientDetails? = nil,
Expand Down
2 changes: 1 addition & 1 deletion Sources/MongoClient/MongoSingleConnectionPool.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public final actor MongoSingleConnectionPool: MongoConnectionPool {
}

public let sessionManager = MongoSessionManager()
public let logger = Logger(label: "org.openkitten.mongokitten.single-connection-pool")
public let logger = Logger(label: "org.orlandos-nl.mongokitten.single-connection-pool")

let buildConnection: BuildConnection
let authenticationSource: String
Expand Down
8 changes: 4 additions & 4 deletions Sources/MongoKitten/MongoDatabase.swift
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public class MongoDatabase {
/// to: "mongodb://localhost/myapp
/// )
/// ```
public static func lazyConnect(to uri: String, logger: Logger = Logger(label: "org.openkitten.mongokitten")) throws -> MongoDatabase {
public static func lazyConnect(to uri: String, logger: Logger = Logger(label: "org.orlandos-nl.mongokitten")) throws -> MongoDatabase {
try lazyConnect(to: ConnectionSettings(uri), logger: logger)
}

Expand All @@ -68,7 +68,7 @@ public class MongoDatabase {
/// to: "mongodb://localhost/myapp
/// )
/// ```
public static func connect(to uri: String, logger: Logger = Logger(label: "org.openkitten.mongokitten")) async throws -> MongoDatabase {
public static func connect(to uri: String, logger: Logger = Logger(label: "org.orlandos-nl.mongokitten")) async throws -> MongoDatabase {
try await connect(to: ConnectionSettings(uri), logger: logger)
}

Expand All @@ -81,7 +81,7 @@ public class MongoDatabase {
/// - parameter settings: The connection settings, which must include a database name
public static func lazyConnect(
to settings: ConnectionSettings,
logger: Logger = Logger(label: "org.openkitten.mongokitten")
logger: Logger = Logger(label: "org.orlandos-nl.mongokitten")
) throws -> MongoDatabase {
guard let targetDatabase = settings.targetDatabase else {
logger.critical("Cannot connect to MongoDB: No target database specified")
Expand All @@ -99,7 +99,7 @@ public class MongoDatabase {
/// - parameter settings: The connection settings, which must include a database name
public static func connect(
to settings: ConnectionSettings,
logger: Logger = Logger(label: "org.openkitten.mongokitten")
logger: Logger = Logger(label: "org.orlandos-nl.mongokitten")
) async throws -> MongoDatabase {
guard let targetDatabase = settings.targetDatabase else {
logger.critical("Cannot connect to MongoDB: No target database specified")
Expand Down

0 comments on commit 8b33fd0

Please sign in to comment.