首页 > 其他 > 详细

Grails - Log

时间:2020-05-12 14:54:03      阅读:55      评论:0      收藏:0      [点我收藏+]

在 Grails 中打印日志

  • 在 controller 和 service 中使用Log:

Demo

  • 在配置文件中配置相关,grails-app/conf/logback.groovy
def index(Integer max) {
    log.info("Test logging.")
    params.max = Math.min(max ?: 10, 100)
    respond dataDictService.list(params), model:[dataDictCount: dataDictService.count()]
}

Grails - Log

原文:https://www.cnblogs.com/duchaoqun/p/12876101.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!