Change printfs to apache log calls.