Ovm debug message

Hello
Is there a way to re-direct debug messages to separate file of your choice using ovm reporting. Tried ovm_report_info with a file name (debug.log) as argument. I was expecting a new file called debug.log with the string in ovm_report_info, instead the message went to the test log (along with all other messages) with a prefix OVM_INFO::debug.log.

I guess I am looking for something equivalent to $fopen, write to the file and $fclose using ovm reporting functions.

Thanks
Joshy

In reply to jjose:

See ovm reporting | Verification Academy

In reply to dave_59:

Thanks Dave,
Tried few experiments with this and it is not working for me yet. Tried this

OVM_FILE fh = $fopen(“comp1.log”,“w”);
set_report_default_file_hier(fh);
set_report_severity_action_hier(OVM_INFO, OVM_LOG);
`ovm_info(get_type_name(), “Component 1 LOG”, OVM_NONE)
$fclose(fh);

The file gets created, but it is empty. I want to set up this log for a component such that all messages from this component and all the instances inside this component will dump to this file. Do u see any issues here.
Thanks
Joshy