Skip to content

Commit

Permalink
Configure logging w/ PGDebugEnabled
Browse files Browse the repository at this point in the history
Should switch to Logging framework...
  • Loading branch information
helje5 committed Oct 29, 2024
1 parent 03d6468 commit e846331
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Sources/PostgreSQLAdaptor/PostgreSQLAdaptorChannel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// ZeeQL
//
// Created by Helge Hess on 03/03/17.
// Copyright © 2017 ZeeZide GmbH. All rights reserved.
// Copyright © 2017-2024 ZeeZide GmbH. All rights reserved.
//

#if os(Windows)
Expand All @@ -14,6 +14,7 @@
import Darwin
#endif
import struct Foundation.Data
import class Foundation.UserDefaults
import ZeeQL
import CLibPQ

Expand All @@ -34,11 +35,12 @@ open class PostgreSQLAdaptorChannel : AdaptorChannel, SmartDescription {

public let expressionFactory : SQLExpressionFactory
public var handle : OpaquePointer?
final let logSQL = true
final let logSQL : Bool

init(adaptor: Adaptor, handle: OpaquePointer) {
self.expressionFactory = adaptor.expressionFactory
self.handle = handle
self.logSQL = UserDefaults.standard.bool(forKey: "PGDebugEnabled")
}

deinit {
Expand Down

0 comments on commit e846331

Please sign in to comment.