我正在使用 Grails 版本 2.2.4,并且我已经安装了 kickstart 插件作为编译“:kickstart-with-bootstrap:0.9.6”。
BuildConfig.groovy
plugins {
runtime ":hibernate:$grailsVersion"
runtime ":jquery:1.8.3"
runtime ":resources:1.1.6"
compile ":kickstart-with-bootstrap:0.9.6"
build ":tomcat:$grailsVersion"
runtime ":database-migration:1.3.2"
compile ':cache:1.0.1'
}
我找到了具有以下目录结构的“KickstartFilters.groovy”过滤器
plugin
-> kickstart-with-bootstrap:0.9.6
-> conf
-> kickstart
-> KickstartFilters.groovy
我的“KickstartFilters.groovy”文件包含以下信息
package kickstart
class KickstartFilters {
def filters = {
all() {
before = {
// Small "logging" filter for controller & actions
log.info(!params.controller ? '/: ' + params : params.controller +"."+(params.action ?: "index")+": "+params)
}
after = {
}
afterView = {
}
}
}
}
虽然 log.info 打印在日志中,如果密码作为参数传递,那么密码信息在日志中可见,那么我怎样才能只防止密码信息?