there are seperate accounts for farm, application pool, etc
make sure the application pool ID is included in the admin group so that logs can be written.
Bruce Ng's software development blog
An archive of solutions of programming problems I have faced in my career