diff --git a/pkg/api/controller.go b/pkg/api/controller.go index 2a9d0ee..87e0422 100644 --- a/pkg/api/controller.go +++ b/pkg/api/controller.go @@ -126,6 +126,7 @@ func (handler *streamHandler) RecordCommand(inputString *string) { "PodName": handler.podName, "NameSpace": handler.podNs, "serviceName":"k8s-webshell", + "short_message":"k8s-webshell", "command": "clear screen", }).Info("record input") @@ -140,6 +141,7 @@ func (handler *streamHandler) RecordCommand(inputString *string) { "PodName": handler.podName, "NameSpace": handler.podNs, "serviceName": "k8s-webshell", + "short_message":"k8s-webshell", "command": handler.logBuff.String(), }).Info("record input") } @@ -160,6 +162,7 @@ func (handler *streamHandler) RecordCommand(inputString *string) { "PodName": handler.podName, "NameSpace": handler.podNs, "serviceName": "k8s-webshell", + "short_message":"k8s-webshell", "command": "ctrl + c", }).Info("record input") handler.logBuff.Reset() diff --git a/pkg/utils/logger.go b/pkg/utils/logger.go index 9c54045..c8e5070 100644 --- a/pkg/utils/logger.go +++ b/pkg/utils/logger.go @@ -95,6 +95,7 @@ func GinRus(logger loggerEntryWithfields, timeFormat string, utc bool) gin.Handl entry := logger.WithFields(logrus.Fields{ "serviceName": "k8s-webshell", + "short_message":"k8s-webshell", "status": c.Writer.Status(), "method": c.Request.Method, "path": requestPath,