Yes of course, it's possible. You can use advanced logger setting using apache log4j. By default, Play!Framework use apache log4j for logging purpose, see this documentation.
You must enabled this advanced setting on application.conf
file using the entry like :
# More logging configuration - config file located at the same level on this file
application.log.path=/log4j.properties
application.log.system.out=off
Suppose you have two modules that located on com.mymodule
and com.othermodule
package. so if you want to make these modules logging on different file, your log4j.properties
file should be like this :
# Define logging file appender for mymodule package
log4j.appender.mymodule=org.apache.log4j.FileAppender
log4j.appender.mymodule.File=mymodule.log
log4j.appender.mymodule.layout=org.apache.log4j.PatternLayout
# Define logging file appender for othermodule package
log4j.appender.othermodule=org.apache.log4j.FileAppender
log4j.appender.othermodule.File=othermodule.log
log4j.appender.othermodule.layout=org.apache.log4j.PatternLayout
log4j.logger.com.mymodule=INFO, package1
log4j.logger.com.othermodule=INFO, package2
For more reference, try to learn from following links: