A stupid n00b question - sorry.

I just landed on a new VxWorks project, with no VxWorks experience. I
am busy R'ing TFM, but here's a quick question.

I want to add a debug trace statement every time any process in the
system receives any message. Rather than change all message handling
code, can I just write a hook function for the kernel to call when it
dispatches a message?

Thanks in advance for any help.