In reply to Rsignori92:
In reply to maximus:
Simply extend the uvm_report_server class and override the compose message creating your own message with format. Anyway you could implement the a function which works on a given string starting from the end up to the first dot for instance or tue second one (the first one could ne the .sv extension). Then in your env you declare it and build it. In this way the nee report server class will be used shortening the message.
Below is my uvm_report server, even though i specify as filename, the entire path is getting printed,
class my_report_server extends uvm_default_report_server;
virtual function string compose_report_message( uvm_report_message report_message,
string report_object_name = "");
uvm_severity severity = report_message.get_severity();
string name = report_message.get_report_object().get_full_name();
string id = report_message.get_id();
string message = report_message.get_message();
string filename = report_message.get_filename();
int line = report_message.get_line();
return $sformatf("%-8s | %16s | %2d | %0t | %-21s | %-7s | %s ",
severity.name(), filename,line,$time,name,id,message);
endfunction : compose_report_message
endclass: my_report_server
The output still looks like below
UVM_ERROR | /design/users/vijey/icmanage_check/learn/uvm/tests/seq_arb_test.sv | 84 | 0 | uvm_test_top | ARB_TEST | Spawning the sequences
I want it to be like
UVM_ERROR | seq_arb_test.sv | 84 | 0 | uvm_test_top | ARB_TEST | Spawning the sequences
Any tips on how to control them?