Alex Bibiano
Alex Bibiano

Reputation: 653

SQLite.swift: Use XCGLogger

I'm using SQLite.swift library in my iOS project.

Now I'm logging SQLite sentences using db.trace(println) as suggested in the documentation, but I want to use the XCGLogger library with something like log.info().

Somebody knows how to do it?

Upvotes: 1

Views: 122

Answers (1)

stephencelis
stephencelis

Reputation: 4964

You can use a closure and call the log.info() function inside of it:

db.trace { SQL in
    log.info(SQL)
}

Upvotes: 2

Related Questions