I am trying to create a function like:
void my_printf(char *fmt, ...) which behaves like printf, except that it will also record all the argument passed in to a text file. Can anybody tell me how to do this?

Thanks.