ferruzzi commented on code in PR #34747:
URL: https://github.com/apache/airflow/pull/34747#discussion_r1346187609


##########
airflow/config_templates/config.yml:
##########
@@ -928,6 +928,21 @@ logging:
       type: boolean
       example: ~
       default: "False"
+    json_serializer:
+      description: |
+        By default, for non-string logged messages all non-json-parsable 
objects are logged as `null` except
+        `datetime` objects which are ISO formatted. Users can optionally 
provide their own JSON serializer or
+        opt to use a `repr` serializer which calls `repr(object)` for any 
non-JSON-serializable objects in the
+        logged message. The 
`airflow.providers.amazon.aws.log.cloudwatch_task_handler.json_serialize` uses
+        `repr` while 
`airflow.providers.amazon.aws.log.cloudwatch_task_handler.json_serialize_legacy`
 uses
+        `null`. If a custom serializer is provide, it must adhear to 
`Callable[[Any], str]`
+        (`def my_serializer(o: Any) -> str`). Be aware, that if opting in to 
using the `repr` serializer, you
+        should take extra care that no new, sensitive, data is logged (e.g. 
credentials). If creating your own

Review Comment:
   Nitpick, take it or leave it.
   
   ```suggestion
           (`def my_serializer(o: Any) -> str`). Be aware, that when using the 
`repr` serializer, you
           should take extra care that no new sensitive data is logged (e.g. 
credentials). If creating your own
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to