Prompt response is highly appreciated

Redirecting Trace to File:

Hey, I want to redirect traces to some file like trace.txt
e.g.
trace(“Welcome”);

It should be written in trace.txt instead of on output…Please tell the exact process…Internet search didnt help me…