Integration with your logger

By default, Daobab uses Java Util Logging (distributed with Java), but can be easy integrated with any kind of your application logger.

Dao integration with logger:

All logger methods are collected into one interface DaobabLogger implemented by Daobab Dao abstract classes

So, the only you need to override this implementation in your Dao:

	@Override
	public void debug(String txt) {
		myloger.fine(txt);
	}
	@Override
	public void info(String txt) {
		myloger.info(txt);
	}
	@Override
	public void error(String txt) {
		myloger.severe(txt);
	}
	@Override
	public void error(String txt,Throwable e) {
		myloger.log(Level.SEVERE,txt,e);
	}

JPQL listener

You can listen any JPQL, produced by Daobab by overriding a method:

@Override
	public void handleQuery(String query) {
		if (debug) log.info("Daobab SQL  ------->    "+query);
	}