update db.inc

modify log function