@@ -42,17 +42,11 @@ int64_t current_time_ms() {
4242// This file just print some information using the logging macro.
4343
4444void PrintLog () {
45- ARROW_LOG (DEBUG ) << " This is the"
46- << " DEBUG"
47- << " message" ;
48- ARROW_LOG (INFO ) << " This is the"
49- << " INFO message" ;
50- ARROW_LOG (WARNING ) << " This is the"
51- << " WARNING message" ;
52- ARROW_LOG (ERROR ) << " This is the"
53- << " ERROR message" ;
54- ARROW_CHECK (true ) << " This is a ARROW_CHECK"
55- << " message but it won't show up" ;
45+ ARROW_LOG (DEBUG ) << " This is the" << " DEBUG" << " message" ;
46+ ARROW_LOG (INFO ) << " This is the" << " INFO message" ;
47+ ARROW_LOG (WARNING ) << " This is the" << " WARNING message" ;
48+ ARROW_LOG (ERROR ) << " This is the" << " ERROR message" ;
49+ ARROW_CHECK (true ) << " This is a ARROW_CHECK" << " message but it won't show up" ;
5650 // The following 2 lines should not run since it will cause program failure.
5751 // ARROW_LOG(FATAL) << "This is the FATAL message";
5852 // ARROW_CHECK(false) << "This is a ARROW_CHECK message but it won't show up";
@@ -98,6 +92,8 @@ TEST(ArrowCheck, PayloadEvaluatedOnFailure) {
9892}
9993
10094TEST (ArrowLog, MultiThreadedLogging) {
95+ // This is mostly a visual test that logging from multiple threads produces
96+ // a clean output without interleaving messages (GH-49433).
10197 constexpr int kNumThreads = 10 ;
10298 constexpr int kNumMessges = 10 ;
10399 std::vector<std::thread> threads;
@@ -107,7 +103,7 @@ TEST(ArrowLog, MultiThreadedLogging) {
107103 for (int i = 0 ; i < kNumThreads ; ++i) {
108104 threads.emplace_back ([i]() {
109105 for (int j = 0 ; j < kNumMessges ; ++j) {
110- ARROW_LOG (INFO ) << " Thread" << i << " message " << j
106+ ARROW_LOG (INFO ) << " Thread " << i << " message " << j
111107 << " - testing thread safety." ;
112108 }
113109 });
0 commit comments