Is possible to create my own $display and replace the system one in verilog?

In some design IPs used in my product, there are a lot of $display inside their code.
Then in the simulation, they print huge information on the screen.
Doesn’t like uvm print message, I’m not able to degrade the print level of $display.
As I cannot modify the IP code, I’m wondering if I can close all the $display in them.
I guess the only way is to create my own $display function then I’m able to control something.
Is this a good way? and if yes, how can I replace the system $display with my own one?
Thanks!

It is possible, but not practical. There is no way to call $display from inside C code for the output you want to see. There is s lot of implicit formatting that $display does based on the data type of its arguments that you would have to re-implement in your C code. Plus dealing with 4-state logic wire strengths.

If the IP code is not encrypted, you can always create a modified copy of it before simulating. Otherwise another option is to post-process the output to filter out what you don’t want to see.

Thank Dave to point out the difficulties of rewriting $display quickly, yes, that’s not easy.
For the time being, I think I’ll take your suggestion to create a copy and modify it by script before simulation, that will solve this problem and also reduce the risk from manually updating the code.
For a long time being, I’ll try to rewrite a simple $display to see if it’s possible to replace the system one.