use rails logger if available, and fail if appropriate for environment