Use log4j for logging
Add query object
Change from log4j 2 to log4j 1.2