diff --git a/README.md b/README.md index 750e217..2612d86 100644 --- a/README.md +++ b/README.md @@ -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(); diff --git a/README_cn.md b/README_cn.md index 652a92d..caf62c4 100644 --- a/README_cn.md +++ b/README_cn.md @@ -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();