Description
Is your feature request related to a problem? Please describe.
We are exporting logs to datadog, and would like exceptions to show up in a single log line. Via the Datadog guidelines, this requires that logs be output in JSON format https://www.datadoghq.com/blog/python-logging-best-practices/#log-in-json-format. We can configure the format of logs in our custom code but the log format for logs from the promptflow executor or serving app use their own format and re #2852 we can only change format (I'm unsure if we can use this to resemble JSON, especially in exceptions)
Describe the solution you'd like
Ability to specify log formatter library for logs. For example https://github.com/madzak/python-json-logger or https://pypi.org/project/JSON-log-formatter/
Describe alternatives you've considered
Using the new feature above to resemble JSON
Trying to hook into Flask handlers like: @app.errorhandler(400)
and @app.errorhandler(Exception)
with no luck
Additional context
Add any other context or screenshots about the feature request here.