Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
TestToolChainDemo
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
dsq
TestToolChainDemo
Commits
99cfb477
Commit
99cfb477
authored
Mar 11, 2026
by
dsq
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
单次打印标红
parent
68aa19e5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
8 deletions
+9
-8
App.kt
composeApp/src/commonMain/kotlin/com.dong.demo013/App.kt
+1
-0
TestLog.ohosArm64.kt
...hosArm64Main/kotlin/com.dong.demo013/TestLog.ohosArm64.kt
+6
-6
build-profile.json5
harmonyApp/build-profile.json5
+2
-2
No files found.
composeApp/src/commonMain/kotlin/com.dong.demo013/App.kt
View file @
99cfb477
...
...
@@ -98,6 +98,7 @@ internal fun HomeScreen(
Button
(
onClick
=
{
pirntSingleHiLog
();
// pirntAllLevelHiLog();
},
modifier
=
Modifier
.
fillMaxWidth
()
)
{
...
...
composeApp/src/ohosArm64Main/kotlin/com.dong.demo013/TestLog.ohosArm64.kt
View file @
99cfb477
...
...
@@ -91,7 +91,7 @@ fun hiLogPrintMsg(type: UInt, level: UInt, domain: UInt, tag: String, message: S
}
actual
fun
pirntSingleHiLog
(){
OH_LOG_PrintMsg
(
0
u
,
3
u
,
4660
u
,
"TestTag"
,
"单次日志打印"
);
hiLogPrintMsg
(
0
u
,
6
u
,
4660
u
,
"TestTag"
,
"单次日志打印"
);
}
...
...
@@ -101,21 +101,21 @@ actual fun pirntAllLevelHiLog(){
// LOG_DEBUG = 3 (调试级别)
// domain = 0x1234 (任意自定义值,范围0x0000-0xFFFF)
// tag = "TestTag" (自定义标签)
OH_LOG_
PrintMsg
(
0
u
,
3
u
,
4660
u
,
"TestTag"
,
"This is a DEBUG log from PrintMsg"
);
hiLog
PrintMsg
(
0
u
,
3
u
,
4660
u
,
"TestTag"
,
"This is a DEBUG log from PrintMsg"
);
// 输出 INFO 级别
// LOG_INFO = 4 (信息级别)
OH_LOG_
PrintMsg
(
0
u
,
4
u
,
4660
u
,
"TestTag"
,
"This is an INFO log from PrintMsg"
);
hiLog
PrintMsg
(
0
u
,
4
u
,
4660
u
,
"TestTag"
,
"This is an INFO log from PrintMsg"
);
// 输出 WARN 级别
// LOG_WARN = 5 (警告级别)
OH_LOG_
PrintMsg
(
0
u
,
5
u
,
4660
u
,
"TestTag"
,
"This is a WARN log from PrintMsg"
);
hiLog
PrintMsg
(
0
u
,
5
u
,
4660
u
,
"TestTag"
,
"This is a WARN log from PrintMsg"
);
// 输出 ERROR 级别
// LOG_ERROR = 6 (错误级别)
OH_LOG_
PrintMsg
(
0
u
,
6
u
,
4660
u
,
"TestTag"
,
"This is an ERROR log from PrintMsg"
);
hiLog
PrintMsg
(
0
u
,
6
u
,
4660
u
,
"TestTag"
,
"This is an ERROR log from PrintMsg"
);
// 输出 FATAL 级别
// LOG_FATAL = 7 (致命级别)
OH_LOG_
PrintMsg
(
0
u
,
7
u
,
4660
u
,
"TestTag"
,
"This is a FATAL log from PrintMsg"
);
hiLog
PrintMsg
(
0
u
,
7
u
,
4660
u
,
"TestTag"
,
"This is a FATAL log from PrintMsg"
);
}
harmonyApp/build-profile.json5
View file @
99cfb477
...
...
@@ -7,11 +7,11 @@
"material": {
"certpath": "/Users/dongsq/.ohos/config/default_harmonyApp_GthGxfoFAEmCFfCK6Yj5azdigDZk5Ro7gO2DpXptcpU=.cer",
"keyAlias": "debugKey",
"keyPassword": "0000001
A4B728A43BA4386F18586D9137545CDA639B28099E8FA559EFAB0F6F723D567546B9B741EC571
",
"keyPassword": "0000001
B7819C2F0053B9ECCCE6CDCB862E00AE039F04BD559BAFADA3DD213CA03DE0A8CE172CBB9FA209C
",
"profile": "/Users/dongsq/.ohos/config/default_harmonyApp_GthGxfoFAEmCFfCK6Yj5azdigDZk5Ro7gO2DpXptcpU=.p7b",
"signAlg": "SHA256withECDSA",
"storeFile": "/Users/dongsq/.ohos/config/default_harmonyApp_GthGxfoFAEmCFfCK6Yj5azdigDZk5Ro7gO2DpXptcpU=.p12",
"storePassword": "0000001
AD9780BBADE281E40B66A35C542A772C7AD62525F90824CB6C75B5BA27E9057E299EF9D23603
2"
"storePassword": "0000001
BAE501502025D5B6E11A6B76286DF01D3499187AF3CBA1A6542FB3FF0BE98A423D21AC88F77575
2"
}
}
],
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment