首页  

play框架日志     所属分类 play 浏览量 633
基于 Logback
 
play.api.Logger

val log = Logger(this.getClass())
val log = Logger("xxx")
    
log.info("info  name="+name)
log.error("error name="+name)


日志配置
conf/logback.xml

https://www.playframework.com/documentation/2.8.x/SettingsLogger

from class path 
-Dlogger.resource=prod-logger.xml

-Dlogger.file=/opt/prod/logger.xml


SLF4J API has a concept of markers

Markers are especially useful for triggering and filtering 
for example,  send an email when a marker is seen, or particular flows can be marked out to their own appenders.

上一篇     下一篇
play Configuration 配置读取

play action 要点

play HTTP routing

play框架依赖注入

play 数据库访问

依赖注入 guice 实例