Convert so more logging to ast_debug (issue #10045, dimas)