MM-9661: tweak post message size log (#8517)
Call out the number of supported characters explicitly, moving the byte limit to parentheses.
Этот коммит содержится в:
коммит произвёл
Harrison Healey
родитель
26b523e4a1
Коммит
d4c0494360
@@ -6512,7 +6512,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "store.sql_post.query_max_post_size.max_post_size_bytes",
|
"id": "store.sql_post.query_max_post_size.max_post_size_bytes",
|
||||||
"translation": "Post.Message supports at most %d bytes"
|
"translation": "Post.Message supports at most %d characters (%d bytes)"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "store.sql_post.query_max_post_size.unrecognized_driver",
|
"id": "store.sql_post.query_max_post_size.unrecognized_driver",
|
||||||
|
|||||||
@@ -1269,8 +1269,6 @@ func (s *SqlPostStore) determineMaxPostSize() int {
|
|||||||
l4g.Warn(utils.T("store.sql_post.query_max_post_size.unrecognized_driver"))
|
l4g.Warn(utils.T("store.sql_post.query_max_post_size.unrecognized_driver"))
|
||||||
}
|
}
|
||||||
|
|
||||||
l4g.Trace(utils.T("store.sql_post.query_max_post_size.max_post_size_bytes"), maxPostSizeBytes)
|
|
||||||
|
|
||||||
// Assume a worst-case representation of four bytes per rune.
|
// Assume a worst-case representation of four bytes per rune.
|
||||||
maxPostSize = int(maxPostSizeBytes) / 4
|
maxPostSize = int(maxPostSizeBytes) / 4
|
||||||
|
|
||||||
@@ -1281,6 +1279,8 @@ func (s *SqlPostStore) determineMaxPostSize() int {
|
|||||||
maxPostSize = model.POST_MESSAGE_MAX_RUNES_V1
|
maxPostSize = model.POST_MESSAGE_MAX_RUNES_V1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
l4g.Info(utils.T("store.sql_post.query_max_post_size.max_post_size_bytes"), maxPostSize, maxPostSizeBytes)
|
||||||
|
|
||||||
return maxPostSize
|
return maxPostSize
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user