The New Relic Agent SDK uses log4cplus for logging. This provides flexibility into log levels, log file locations, etc.
Customizing your log4cplus files
The SDK searches for a log4cplus.properties file in this order:
- The location specified by
- Your $HOME/.newrelic directory
- The current working directory
To configure logging:
- Copy the config/log4cplus.properties file to one of the locations specified above.
- Optional: Modify the log4cplus.properties file by following the instructions at http://sourceforge.net/p/log4cplus/wiki/Home/.
Reviewing log files
All functions in the SDK return integers or longs. Any positive number indicates success and any negative number indicates a failure. For a list of all error codes, see the New Relic header files for a list of all error codes.
For more help
Additional documentation resources include:
- Configuring the Agent SDK (choosing daemon-mode or embedded mode, updating your configuration's environmental variables, and running the agent in the selected mode)
- Instrumenting your code with the Agent SDK (how to measure transactions and important segments of your code)
- Limiting or disabling Agent SDK settings (using additional options for data collection)