OpenSRF supports 5 different logging levels: ERROR, WARN, INFO, DEBUG, and INTERNAL. They are controlled in the "bootstrap" configuration file, usually found at /openils/conf/opensrf_core.xml. Log levels are configured with a number, 1 to 5, where 1 equals ERROR and 5 equals INTERNAL. There are 4 classifications of services across which the configured log level is shared. These include Apache (gateway), the OpenSRF routers, OpenSRF services, and srfsh. In a production environment, the following log levels are recommended for each service.
ERROR: Error logging only shows system and application errors. These errors typically indicate an application-level exception and are non-fatal to the system as a whole. However, if systemic problems arise, they will show up in this log as well.
WARN: There isn't a lot of content that logs at this level. The most useful data that is logged as a WARNing are instances of exhausted C service drone processes. A certain amount of this is expected, but many occurrences of this on a daily basis is an indication of insufficient resources or resource starvation.
2008-01-14 11:32:08 app123 open-ils.cstore: [WARN:877:osrf_prefork.c:515:] We have no children available - waiting for one to show up…
INFO: Info logging is used to indicate application-level activity. Info logs provide details on inbound API requests, execution of custom policy scripts (circulation / holds), and high-level flow of execution. Most problems can be diagnosed at INFO level. Info logging also includes API call timing data. For example:
2009-08-26 00:00:00 app123 open-ils.cstore: [INFO:9762:osrf_stack.c:116:] Message processing duration 0.001547
The Message processing duration indicates the amount of time between receiving a request and sending the response. This data is logged for all OpenSRF services at all levels. This data is also logged for OpenSRF client applications, which means top-level HTTP requests which are translated into OpenSRF calls are logged with the call duration as well. This results in a system that produces timing data for each request to each OpenSRF component for ease of identifying bottlenecks in software execution.
DEBUG: Debug logs should only be used for development or debugging purposes. They include a high volume of log data which is generally only useful for developers.
INTERNAL: This is debug logging on stereoids. It should never be used.