Why don't you use elog(LOG, instead of printf ?
-- Pip-pipSaileshhttp://www.cs.berkeley.edu/~sailesh