Skip to content

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
  • Loading branch information
MuggleWei committed Nov 19, 2023
1 parent 673bcb6 commit af1cc04
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,15 @@ int main()
double pi = 3.14159265359;
HACLOG_DEBUG("π = %.5f", pi);
// NOTE: assert false will crash when build type is debug
int actual = 0;
int expect = 1;
HACLOG_ASSERT_MSG(actual == expect,
"actual: %d, expect: %d", actual, expect);
// NOTE: fatal level log will crash when build type is debug
HACLOG_FATAL("fatal message! crash when debug");
// cleanup thread context
haclog_thread_context_init();
Expand Down
9 changes: 9 additions & 0 deletions README_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,15 @@ int main()
double pi = 3.14159265359;
HACLOG_DEBUG("π = %.5f", pi);
// NOTE: assert false will crash when build type is debug
int actual = 0;
int expect = 1;
HACLOG_ASSERT_MSG(actual == expect,
"actual: %d, expect: %d", actual, expect);
// NOTE: fatal level log will crash when build type is debug
HACLOG_FATAL("fatal message! crash when debug");
// cleanup thread context
haclog_thread_context_init();
Expand Down

0 comments on commit af1cc04

Please sign in to comment.