https://mattermost.atlassian.net/browse/MM-52216
```release-note
NONE
```
Этот коммит содержится в:
Agniva De Sarker
2023-04-21 22:23:56 +05:30
коммит произвёл GitHub
родитель 041cbe2d24
Коммит 67735be261
6 изменённых файлов: 34 добавлений и 10 удалений

Просмотреть файл

@@ -233,3 +233,14 @@ func SanitizeDataSource(driverName, dataSource string) (string, error) {
return "", errors.New("invalid drivername. Not postgres or mysql.")
}
}
const maxTokenSize = 50
// trimInput limits the string to a max size to prevent clogging up disk space
// while logging
func trimInput(input string) string {
if len(input) > maxTokenSize {
input = input[:maxTokenSize] + "..."
}
return input
}