[英]SQLite.swift: Use XCGLogger
I'm using SQLite.swift
library in my iOS project. 我在我的iOS项目中使用
SQLite.swift
库。
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()
. 现在,按照文档中的建议,使用db.trace(println)记录
SQLite
语句,但是我想将XCGLogger
库与log.info()
。
Somebody knows how to do it? 有人知道该怎么做吗?
You can use a closure and call the log.info()
function inside of it: 您可以使用闭包并在其中调用
log.info()
函数:
db.trace { SQL in
log.info(SQL)
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.