I have an application that makes use of the Mozilla LDAP library. We're diagnosing a problem involving the LDAP library failing to make a connection to the server. I'm attempting to get additional information from the LDAP library by tossing a debug version of the lib in with the application and enabling debug using ldap_set_opt. Unfortunately, I think the debug library is sending debug strings to standard error.
While I'm working on recompiling the LDAP client library again, hopefully enabling the option that makes it call OutputDebugString instead of streaming to stderr, a nice solution would be to capture the stderr output to a file. The application, though, is running as a Windows service.
Anyone know how I could redirect stderr to a file for an application running as a service?
edit
I'm hoping not to have to modify any more of the service source code than I already have. Options in the service configuration would be ideal.