HiLog实例
package com.jinyou.basetest;
import com.jinyou.basetest.slice.MainAbilitySlice;
import ohos.aafwk.ability.Ability;
import ohos.aafwk.content.Intent;
import ohos.hiviewdfx.HiLog;
import ohos.hiviewdfx.HiLogLabel;
public class MainAbility extends Ability {
private static final HiLogLabel LABEL = new HiLogLabel(HiLog.LOG_APP, 0x00201, "MY_TAG");
@Override
public void onStart(Intent intent) {
super.onStart(intent);
super.setMainRoute(MainAbilitySlice.class.getName());
super.setUIContent(ResourceTable.Layout_ability_main);
HiLog.info(LABEL, "jinyoutest今有测试日志.");
}
}
在DevEco Studio的底部,切换到“HiLog”窗口,设置日志的过滤条件。
输入jinyou