helper for logging errors to the newrelic_agent.log properly. Logs the error at error level
[Validate]