I've a simple scala app (not using Play MVC framework) but that uses play.api.Logger
I'm trying to figure out the pattern I need to add to include the File and Line where the log was done.
This was the logback.xml I was using from the start:
<configuration>
<conversionRule conversionWord="coloredLevel" converterClass="play.api.Logger$ColoredLevel"/>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%date %-16coloredLevel %message %n</pattern>
</encoder>
</appender>
<logger name="play" level="INFO"/>
<logger name="application" level="DEBUG"/>
<root level="INFO">
<appender-ref ref="STDOUT"/>
</root>
</configuration>
and it would display something like:
2016-02-22 19:20:05,901 [debug] MY-LOG-MESSAGE
So I tried to change using the docs, and I came to something like
<pattern>%date %-16coloredLevel %F L.%L:: %message %n</pattern>
that produced
2016-02-22 22:26:49,725 [debug] Logger.scala L.74:: MY-LOG-MESSAGE
It is reporting the File as the play.api.Logger class file and the corresponding line.
What do I need to write to I could get something like com.package.Clazz.scala L.10
?
EDIT
Output for marcospereira answer:
Got something like:
2016-02-23 11:39:36,624 [info] play.api.LoggerLike$class L.93:: MESSAGE