add rake db test, add debug setting, impl. in logger