jason810496 commented on code in PR #73820:
URL: https://github.com/apache/airflow/pull/73820#discussion_r4367519088


##########
go-sdk/pkg/execution/logger_test.go:
##########
@@ -357,6 +358,34 @@ func TestSocketLogHandlerStandardFieldsOverrideAttrs(t 
*testing.T) {
        assert.Equal(t, "example", entry["logger"])
 }
 
+func TestSocketLogHandlerEventAndTimestampOverrideAttrs(t *testing.T) {
+       for _, tt := range []struct {
+               key string
+               val any
+       }{
+               {key: "event", val: "user value"},
+               {key: "timestamp", val: 12345},
+       } {
+               t.Run(tt.key, func(t *testing.T) {
+                       var buf bytes.Buffer
+                       handler := NewSocketLogHandler(&buf, slog.LevelDebug)
+                       logger := slog.New(handler).With(tt.key, tt.val)

Review Comment:
   > So should we rename the field when the user sets a reserved one, the 
logrus way?
   event would become fields.event and nothing gets dropped.
   
   Sure, let's go with this direction, thanks.



-- 
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