[1.2.5] How to disable JPA logging?

971 views
Skip to first unread message

Ryan Burke

unread,
Jul 24, 2012, 1:02:15 PM7/24/12
to play-fr...@googlegroups.com
JPA logging is filling up my logs with spam. When I follow Play instructions for setting the log4j rules and levels, I cannot get the JPA logging to follow suit. Is JPA module following it's own log4j config? How can I disable seeing the JPA debug messages in my Play app logs?

notalifeform

unread,
Jul 24, 2012, 2:46:35 PM7/24/12
to play-fr...@googlegroups.com
Hi,

Could you post your relevant config parameters and the debug-ouput that is bothering you?

regards,

Robert

Ryan Burke

unread,
Jul 24, 2012, 3:39:36 PM7/24/12
to play-fr...@googlegroups.com
My log4j.properties is the default one as described here: http://www.playframework.org/documentation/1.2.5/logs
it is in directory /conf/log4j.properties

a copy/paste of the file:

log4j.rootLogger=ERROR, Console

 

log4j.logger.play=INFO

 

# Console

log4j.appender.Console=org.apache.log4j.ConsoleAppender

log4j.appender.Console.layout=org.apache.log4j.PatternLayout

log4j.appender.Console.layout.ConversionPattern=%d{ABSOLUTE} %-5p ~ %m%n


by this definition, I would expect not to see any DEBUG level messages in the console logs. But I see logging like the following every time there is a JPA query to the db:


13:36:44,253 DEBUG ~ select rdinvite0_.id as id17_, rdinvite0_.createdDate as createdD2_17_, rdinvite0_.email as email17_, rdinvite0_.invitationCode as invitati4_17_, rdinvite0_.invitedUserId as invitedU8_17_, rdinvite0_.invitedByUserId as invitedB9_17_, rdinvite0_.source as source17_, rdinvite0_.status as status17_, rdinvite0_.updatedDate as updatedD7_17_ from RDInvite rdinvite0_ where rdinvite0_.invitationCode=? limit ?


Those are crazy long logs and they happen all the time. I don't need them and they take up 99% of the log output.


-- 
Ryan Burke
Sent with Sparrow

--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To view this discussion on the web visit https://groups.google.com/d/msg/play-framework/-/Uiormjrv0fcJ.
To post to this group, send email to play-fr...@googlegroups.com.
To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.

Tom Carchrae

unread,
Jul 24, 2012, 11:21:46 PM7/24/12
to play-fr...@googlegroups.com
any chance you have this in in application.conf

# Debug SQL statements (logged using DEBUG level):
jpa.debugSQL=true

Ryan Burke

unread,
Jul 26, 2012, 6:04:02 PM7/26/12
to play-fr...@googlegroups.com, t...@carchrae.net
That was it. Thanks, Tom!
To post to this group, send email to play-framework@googlegroups.com.
To unsubscribe from this group, send email to play-framework+unsubscribe@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.

--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To post to this group, send email to play-framework@googlegroups.com.
To unsubscribe from this group, send email to play-framework+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages