Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
dgraph-orm的早期版本默认提供查询日志记录,但在最新更新后它已被关闭。那么有什么方法可以打开日志记录。我需要调试并确定被触发的查询是否正确。
这是我尝试过的:
dgraph.connect(config.database.dgraph); dgraph.logging((a)=>console.log(a));
我使用的版本是 1.2.2。
我已经检查过它的工作正常,找到下面的片段
import dgraph from 'dgraph-orm'; // you can pass your logger function here dgraph.logging(console.log);