Uvm_info: tweak to shorten printing

Whenever I use uvm_info it prints the location in the file + hierarchical path, then the ID + MSG.
E.g.:

UVM_INFO sink_driver.svh(50) @ 17.5 ns: uvm_test_top.m_env.my_sink_agent.m_driver [sink_driver::run_phase] samples captured: 140 + j* 0

Is there a way to avoid printing of the underlined part?

I strongly recommend that you write a perl/sed/awk script to manipulate the output you want rather than try to do this within the UVM.

There is a UVM_REPORT_DISABLE_FILE_LINE macro that you can define, but unfortunately that removes the file and line number from all messages including errors and warnings. It also prevents you from using the GUI to click on the message and take you to the source of the message.

You cannot remove the time from the report without overriding the UVM report server’s compose_message method, which I also strongly recommend against. Only one person can override the message format, and if multiple people start doing this, you wind up with chaos.

You can shorten the hierarchical path by emitting the message from a different context by using `uvm_info_context with uvm_top as the context, or some other uvm_reporter object. This will shorten the hierarchical path, but you lose the ability to control the message hierarchically.

Thanks! With the info provided, I agree post-processing with a script is probably the best way to go.

UVM does not provide any option to disable printing of hierarchical name in messages. Therefore, if you want to omit the hierarchical name, you must override the default message format. This can be achieved by:

1 Defining new report server by extending uvm_report_server and overriding the compose_message method
2 Replacing uvm_report_server with the newly defined server

Please NOTE UVM1.2 had updated the report mechanism, you should extend your report server from uvm_default_report_server, and the function you should overide is compose_report_message function.