     fileprivate var updateStatementCache: [String: UpdateStatement] = [:]
     
     init(path: String, configuration: Configuration, schemaCache: DatabaseSchemaCache) throws {
-        // Error log setup must happen before any database connection
-        Database.errorLogSetup
+        #if !SWIFT_PACKAGE
+            // Error log setup must happen before any database connection
+            Database.errorLogSetup
+        #endif
         
         // See https://www.sqlite.org/c3ref/open.html
         var sqliteConnection: SQLiteConnection? = nil

            log(resultCode, message)
        }
    }()
    
    
    // MARK: - Database Information

            // > sqlite3_close() will leave the database connection open and
            // > return SQLITE_BUSY.
            let code = sqlite3_close(sqliteConnection)
            #if !SWIFT_PACKAGE
                if code != SQLITE_OK, let log = logErrorFunction {
                    // A rare situation where GRDB doesn't fatalError on
                    // unprocessed errors.
                    let message = String(cString: sqlite3_errmsg(sqliteConnection))
                    log(ResultCode(rawValue: code), "could not close database: \(message)")
                    if code == SQLITE_BUSY {
