Logging in Service Code
The easiest and best method for logging events in service code is to use the global Agent logger, rather than the Web services logger. The global Agent logger is best suited for services, handlers, connectors, and transports. This global log file, located at <installdir>/logs/agent.log, is instantiated automatically when the Agent is started.
Using the Global Agent Logger in Service Code introduces the global Agent logger.
Server-side Logging through the Web Services Logger discusses the Web services logger in relation to services.