Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for parseCniLog (0.19 sec)

  1. cni/pkg/log/uds.go

    			logger.LogWithTime(istiolog.WarnLevel, m.Msg, m.Time)
    		case "error":
    			logger.LogWithTime(istiolog.ErrorLevel, m.Msg, m.Time)
    		}
    	}
    }
    
    // parseCniLog is tricky because we have known and arbitrary fields in the log, and Go doesn't make that very easy
    func parseCniLog(l string) (cniLog, bool) {
    	var raw map[string]json.RawMessage
    	if err := json.Unmarshal([]byte(l), &raw); err != nil {
    Registered: Wed Nov 06 22:53:10 UTC 2024
    - Last Modified: Fri Jun 28 19:12:54 UTC 2024
    - 4.7K bytes
    - Viewed (0)
  2. cni/pkg/log/uds_test.go

    				Arbitrary: map[string]any{
    					"key": "string value",
    					"bar": float64(2),
    				},
    			},
    		},
    	}
    	for _, tt := range cases {
    		t.Run(tt.name, func(t *testing.T) {
    			got, _ := parseCniLog(tt.in)
    			assert.Equal(t, got, tt.out)
    		})
    	}
    Registered: Wed Nov 06 22:53:10 UTC 2024
    - Last Modified: Wed Jun 12 16:26:28 UTC 2024
    - 4.1K bytes
    - Viewed (0)
Back to top