From a10227e589804cfcae78b6248ceb3483a9832746 Mon Sep 17 00:00:00 2001 From: cheliangzhao Date: Wed, 11 Feb 2026 11:40:15 +0800 Subject: [PATCH] refactor: remove hilog device logging section from build-deploy skill --- CHANGELOG.md | 1 - README.md | 1 - harmonyos-build-deploy/SKILL.md | 49 --------------------------------- 3 files changed, 51 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f5fa6a..3baba06 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,7 +17,6 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). ### Added -- **harmonyos-build-deploy**: Device logging section (hilog commands, filtering options, ArkTS logging example) - **harmonyos-build-deploy**: Wireless debugging documentation (hdc tconn) - **harmonyos-build-deploy**: Additional bm commands (install -r reinstall, clean cache/data) - **harmonyos-build-deploy**: Cross-reference to arkts-development skill diff --git a/README.md b/README.md index a1e0300..767f648 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,6 @@ Build, package, and deploy HarmonyOS applications. - hvigorw build commands - ohpm package manager - hdc device installation and wireless debugging -- Device logging (hilog) - Module type identification - Troubleshooting common errors diff --git a/harmonyos-build-deploy/SKILL.md b/harmonyos-build-deploy/SKILL.md index d4552d6..0b0d922 100644 --- a/harmonyos-build-deploy/SKILL.md +++ b/harmonyos-build-deploy/SKILL.md @@ -334,55 +334,6 @@ Run via `hdc -t shell "aa ..."`: | `aa force-stop ` | Force stop application | | `aa dump -a` | Dump all running abilities | -## Device Logging (hilog) - -Use hilog to view device logs for debugging. Run via `hdc -t shell "hilog ..."`: - -```bash -# Stream all logs (like adb logcat) -hdc -t shell "hilog" - -# Filter by tag -hdc -t shell "hilog -T " - -# Filter by log level (DEBUG, INFO, WARN, ERROR, FATAL) -hdc -t shell "hilog -L ERROR" - -# Combine tag and level filters -hdc -t shell "hilog -T MyApp -L WARN" - -# Clear log buffer -hdc -t shell "hilog -r" - -# Show only recent logs (last N lines) -hdc -t shell "hilog -t 100" -``` - -### Common hilog Options - -| Option | Description | -|--------|-------------| -| `-T ` | Filter by log tag | -| `-L ` | Minimum log level: DEBUG, INFO, WARN, ERROR, FATAL | -| `-D ` | Filter by domain (hex, e.g., `0x0001`) | -| `-r` | Clear log buffer | -| `-t ` | Show only last N log entries | -| `-x` | Exit after printing existing logs (no streaming) | - -### Logging in ArkTS Code - -```typescript -import { hilog } from '@kit.PerformanceAnalysisKit'; - -const DOMAIN: number = 0x0000; -const TAG: string = 'MyApp'; - -hilog.info(DOMAIN, TAG, 'Application started'); -hilog.error(DOMAIN, TAG, 'Failed to load data: %{public}s', error.message); -``` - -**Note:** Use `%{public}s` for string parameters that should be visible in logs. Without `{public}`, parameters are masked as `` in release builds. - ## Troubleshooting | Error | Cause | Solution |