summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Hallam <jesse.hallam@gmail.com>2018-03-29 10:02:58 -0400
committerHarrison Healey <harrisonmhealey@gmail.com>2018-03-29 10:02:58 -0400
commitd4c04943604b69a0dc6bbc94172968ad234ef077 (patch)
tree362a0a3519501b21e523c7644ab30fcaf348275f
parent26b523e4a16ce99253b642a8354c3c7dbb865488 (diff)
downloadchat-d4c04943604b69a0dc6bbc94172968ad234ef077.tar.gz
chat-d4c04943604b69a0dc6bbc94172968ad234ef077.tar.bz2
chat-d4c04943604b69a0dc6bbc94172968ad234ef077.zip
MM-9661: tweak post message size log (#8517)
Call out the number of supported characters explicitly, moving the byte limit to parentheses.
-rw-r--r--i18n/en.json2
-rw-r--r--store/sqlstore/post_store.go4
2 files changed, 3 insertions, 3 deletions
diff --git a/i18n/en.json b/i18n/en.json
index 0ba03fb7d..0c294e72d 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -6512,7 +6512,7 @@
},
{
"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",
diff --git a/store/sqlstore/post_store.go b/store/sqlstore/post_store.go
index 182cf4891..dc7248057 100644
--- a/store/sqlstore/post_store.go
+++ b/store/sqlstore/post_store.go
@@ -1269,8 +1269,6 @@ func (s *SqlPostStore) determineMaxPostSize() int {
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.
maxPostSize = int(maxPostSizeBytes) / 4
@@ -1281,6 +1279,8 @@ func (s *SqlPostStore) determineMaxPostSize() int {
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
}