Skip to content

Commit 83c51e1

Browse files
committed
DPL: add test for backtrace on error
1 parent 2d4b0a1 commit 83c51e1

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Framework/Foundation/test/test_SignpostLogger.cxx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include <iostream>
2020

2121
O2_DECLARE_LOG(test_Signpost2, "my category2");
22+
O2_DECLARE_DYNAMIC_STACKTRACE_LOG(SignpostStacktrace);
2223

2324
int main(int argc, char** argv)
2425
{
@@ -57,4 +58,9 @@ int main(int argc, char** argv)
5758
O2_SIGNPOST_START(test_SignpostDynamic, id, "Test category", "This is dynamic signpost which you will see, because we turned them on");
5859
O2_SIGNPOST_END(test_SignpostDynamic, id, "Test category", "This is dynamic signpost which you will see, because we turned them on");
5960
#endif
61+
62+
// Test stacktraces
63+
O2_SIGNPOST_ID_GENERATE(idStacktrace, SignpostStacktrace);
64+
O2_LOG_ENABLE(SignpostStacktrace);
65+
O2_SIGNPOST_EVENT_EMIT_ERROR(SignpostStacktrace, idStacktrace, "Test category", "An error with stacktrace %d \n", 1);
6066
}

0 commit comments

Comments
 (0)