It is used in [ray](https://github.com/ray-project/ray/blob/master/src/ray/util/logging.cc#L47-L50). And it can print out the call stack as following. ``` /Users/yuhguo/git/arrow/cpp/src/arrow/util/logging-test.cc:63: Check failed: false This is a example of ARROW_CHECK(false) 0 logging-test 0x000000010407b614 _ZN5arrow7CerrLog14PrintBackTraceEv + 52 1 logging-test 0x000000010407b5b6 _ZN5arrow7CerrLogD2Ev + 118 2 logging-test 0x000000010407b505 _ZN5arrow7CerrLogD1Ev + 21 3 logging-test 0x000000010407b529 _ZN5arrow7CerrLogD0Ev + 25 4 logging-test 0x000000010407b3c0 _ZN5arrow8ArrowLogD2Ev + 80 5 logging-test 0x000000010407b3f5 _ZN5arrow8ArrowLogD1Ev + 21 6 logging-test 0x0000000104078c15 _ZN5arrow33PrintLogTest_LogTestWithInit_Test8TestBodyEv + 549 7 logging-test 0x00000001040e2d7e _ZN7testing8internal38HandleSehExceptionsInMethodIfSupportedINS_4TestEvEET0_PT_MS4_FS3_vEPKc + 126 8 logging-test 0x000000010409862b _ZN7testing8internal35HandleExceptionsInMethodIfSupportedINS_4TestEvEET0_PT_MS4_FS3_vEPKc + 123 9 logging-test 0x0000000104098556 _ZN7testing4Test3RunEv + 198 10 logging-test 0x000000010409a19d _ZN7testing8TestInfo3RunEv + 221 11 logging-test 0x000000010409ba3c _ZN7testing8TestCase3RunEv + 236 12 logging-test 0x00000001040aaa1c _ZN7testing8internal12UnitTestImpl11RunAllTestsEv + 908 13 logging-test 0x00000001040e6fbe _ZN7testing8internal38HandleSehExceptionsInMethodIfSupportedINS0_12UnitTestImplEbEET0_PT_MS4_FS3_vEPKc + 126 14 logging-test 0x00000001040aa42b _ZN7testing8internal35HandleExceptionsInMethodIfSupportedINS0_12UnitTestImplEbEET0_PT_MS4_FS3_vEPKc + 123 15 logging-test 0x00000001040aa2dc _ZN7testing8UnitTest3RunEv + 412 16 logging-test 0x00000001040797a1 _Z13RUN_ALL_TESTSv + 17 17 logging-test 0x000000010407977b main + 43 18 libdyld.dylib 0x00007fff77d2f015 start + 1 19 ??? 0x0000000000000001 0x0 + 1 Abort trap: 6 ``` However, `glog` result is more readable. ``` F0908 17:17:45.827680 2961466240 logging-test.cc:63] Check failed: false This is a example of ARROW_CHECK(false) *** Check failure stack trace: *** @ 0x10af2b58a google::LogMessage::Fail() @ 0x10af2961e google::LogMessage::SendToLog() @ 0x10af2a22f google::LogMessage::Flush() @ 0x10af2a069 google::LogMessage::~LogMessage() @ 0x10af2a325 google::LogMessage::~LogMessage() @ 0x10af23cbc arrow::ArrowLog::~ArrowLog() @ 0x10af23d05 arrow::ArrowLog::~ArrowLog() @ 0x10af20745 arrow::PrintLogTest_LogTestWithInit_Test::TestBody() @ 0x10afa6a9e testing::internal::HandleSehExceptionsInMethodIfSupported<>() @ 0x10af5c47b testing::internal::HandleExceptionsInMethodIfSupported<>() @ 0x10af5c3a6 testing::Test::Run() @ 0x10af5dfed testing::TestInfo::Run() @ 0x10af5f88c testing::TestCase::Run() @ 0x10af6e86c testing::internal::UnitTestImpl::RunAllTests() @ 0x10afaacde testing::internal::HandleSehExceptionsInMethodIfSupported<>() @ 0x10af6e27b testing::internal::HandleExceptionsInMethodIfSupported<>() @ 0x10af6e12c testing::UnitTest::Run() @ 0x10af212d1 RUN_ALL_TESTS() @ 0x10af212ab main Abort trap: 6 ```
[ Full content available at: https://github.com/apache/arrow/pull/2522 ] This message was relayed via gitbox.apache.org for [email protected]
