Pig output goes to STDOUT, info goes to STDERR. If you want to log both, use pig xxxx > filename 2>&1

You can open a file to log inside UDF, but your log will be in different work nodes. For debugging purpose, usually I print some debugging output to STDOUT, and check the JobTracker UI.

Daniel

On 03/22/2011 10:03 AM, Lai Will wrote:
Hello,

This may seem a dumb question..
Is there a way to log the pig output to a file?

I tried

pig test.pig>  filename

However that does not work.

A related question:
How can we use logging in a UDF that logs out to a file?


Best,
Will

Reply via email to