Slick的日志记录选项 [英] Logging options for Slick

查看:50
本文介绍了Slick的日志记录选项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建一个Play 2.1应用程序,在该应用程序中,我决定使用Slick进行数据库交互.
但是我找不到有关如何为Slick配置/启用日志记录的文档.
有人知道吗?

I'm createing a Play 2.1 app, in which I have decided to use Slick for database interaction.
However I can't find documentation about how to configure/enable logging for Slick.
Anyone knows this?

推荐答案

Slick不会执行DEBUG级别以上的任何日志记录.在application.conf中,如果您添加以下行:

Slick doesn't do much of any logging above DEBUG level. In application.conf if you add the line:

logger.scala.slick=DEBUG

您将被查询编译器中的信息所困扰.

you're going to get deluged with information from the query compiler.

您可能只对会话信息(连接池管理,查询字符串等)感兴趣.在这种情况下,只需添加

You're probably just interested in the session information (Connection pool management, query strings, etc). In which case, just add

logger.scala.slick.session=DEBUG

到您的Play应用程序的application.conf

to your Play application's application.conf

这篇关于Slick的日志记录选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆