change logging to have more metadata