
回复
console.log('Failed to load the content. Cause: %{public}s','1',sysBarProps)
如果对象、数组层级较深,可使用 JSON.stringify() 格式化后输出,避免内容被省略:
console.info('cateNameArr',JSON.stringify(this.cateNameArr, null, 2));
打印数据如下,数组里面对象格式
import { hilog } from '@kit.PerformanceAnalysisKit';
hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onCreate');