get log from db