# Message Reporting

**URL:** <https://verificationacademy.com/forums/t/message-reporting/41648>\
**Category:** UVM\
**Tags:** uvm-message-reporting, UVM\
**Created:** [May 11, 2023, 12:08pm UTC](https://verificationacademy.com/forums/t/message-reporting/41648 "2023-05-11T12:08:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sayyed](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/s/6de8d8/32.png) [@Sayyed](https://verificationacademy.com/forums/u/Sayyed)\
**Post date:** [May 11, 2023, 12:08pm UTC](https://verificationacademy.com/forums/t/message-reporting/41648/1 "2023-05-11T12:08:50Z")

</div>

Hi,

I am trying to filter out messages with a particular ID i.e “UVM\_DBG” to a seprate log file i.e “debug\_lib.log”. I am expecting the messages in log file at the execution time, but messages are written to the file once the simulation end not the the time the uvm\_info/uvm\_warning is executed.  
am I missing something here?

module a  
UVM\_FILE debug\_log;

Initial  
begin

debug\_log = $fopen(“debug\_lib.log”);  
uvm\_top.set\_report\_id\_action\_hier(“UVM\_DBG”,UVM\_LOG | UVM\_DISPLAY );  
uvm\_top.set\_report\_id\_file\_hier(“UVM\_DBG”, debug\_log);  
end

endmodule

---

<div class="post-metadata">

**Author:** ![cgales](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/c/ccd318/32.png) [@cgales](https://verificationacademy.com/forums/u/cgales)\
**Post date:** [May 11, 2023, 1:00pm UTC](https://verificationacademy.com/forums/t/message-reporting/41648/2 "2023-05-11T13:00:43Z")

</div>

_In reply to [Sayyed](https://verificationacademy.com/forums/t/message-reporting/41648):_

For performance reasons, messages written to log files aren’t immediately flushed to the file. There are different factors which control this behavior, but it’s possible that you won’t see any messages until the simulation finishes and all open files are flushed.

Why do you want the messages to immediately appear in the log file?

---

<div class="post-metadata">

**Author:** ![Sayyed](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/s/6de8d8/32.png) [@Sayyed](https://verificationacademy.com/forums/u/Sayyed)\
**Post date:** [May 12, 2023, 9:35am UTC](https://verificationacademy.com/forums/t/message-reporting/41648/3 "2023-05-12T09:35:59Z")

</div>

_In reply to [cgales](https://verificationacademy.com/forums/t/message-reporting/41648/2):_

I have a task which dump the memory content for a given address range to the log, based on the data on some address i have to run a TCL command to check some scenario while simulation is in pasue.

---

<div class="post-metadata">

**Author:** ![chrisspear](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/chrisspear/32/2702_2.png) [@chrisspear](https://verificationacademy.com/forums/u/chrisspear)\
**Post date:** [May 12, 2023, 2:11pm UTC](https://verificationacademy.com/forums/t/message-reporting/41648/4 "2023-05-12T14:11:30Z")

</div>

_In reply to [Sayyed](https://verificationacademy.com/forums/t/message-reporting/41648/3):_

A better way would be to keep the data and log messages separate. Write the data to a file and close it. This should help with the buffering issue.
