add debug log to restful controller