Log Management in FruitsApp in HarmonyOS

  • domain: service domain of logs. The value ranges from 0x0 to 0xFFFFF. You can define the value as required.
  • tag: log identifier. You are advised to use this parameter to identify a particular service behaviour or the class holding ongoing method.
  1. INFO
  2. WARN
  3. ERROR
  4. FATAL
  • A Harmony OS phone (with the USB cable), which is used for debugging.
  • Latest DevEcho studio installed.
  • Add required images in resources > rawfile
  • Add custom strings in resources > base > element > string.json
  • Define supporting devices in config.json file.
  • Add required permissions in config,json.
  • Define Log Label before using HiLog methods.
  • Do not log the sensitive data.
  • Use respective Log methods to print logs.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store