How to get count for a particular id in uvm in a test sequence

,

I have a scenario like I need to count id of uvm_info message and need to check, so how to do this with an example

In reply to karthy_raj:

module top;
  import uvm_pkg::*;
  
  uvm_report_server rs;
  initial begin   
    rs = uvm_report_server::get_server();
    uvm_report_info("ID1", "First Message");
    uvm_report_warning("ID1","Second Message");
    $display("ID1 message count = %d",rs.get_id_count("ID1"));
  end
endmodule


In reply to dave_59:

I used this uvm_report_server::get_server().get_id_count(“ID”) in my testcase and it is working fine.

Thanks Dave