Skip to content

Commit

Permalink
Print optional thread name if available
Browse files Browse the repository at this point in the history
  • Loading branch information
albertziegenhagel committed Oct 12, 2024
1 parent 4a82729 commit d5c7d34
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/etl_file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -820,7 +820,7 @@ int main(int argc, char* argv[])

if(should_ignore(options, observer.current_event_name)) return;

std::cout << std::format("@{} {:30}: pid {} tid {} ...\n", header.timestamp, observer.current_event_name, process_id, event.thread_id());
std::cout << std::format("@{} {:30}: pid {} tid {} name '{}'...\n", header.timestamp, observer.current_event_name, process_id, event.thread_id(), event.thread_name() ? utf8::utf16to8(*event.thread_name()) : "<none>");

if(options.dump_trace_headers) common::detail::dump_buffer(header.buffer, 0, header.buffer.size(), "header");
if(options.dump_events) common::detail::dump_buffer(event.buffer(), 0, event.buffer().size(), "event");
Expand Down

0 comments on commit d5c7d34

Please sign in to comment.