You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pegasus.apache.org by "acelyc111 (via GitHub)" <gi...@apache.org> on 2023/09/08 09:36:16 UTC

[GitHub] [incubator-pegasus] acelyc111 commented on a diff in pull request #1598: feat enhance: Redacted user key-values printed in logs.

acelyc111 commented on code in PR #1598:
URL: https://github.com/apache/incubator-pegasus/pull/1598#discussion_r1319613641


##########
src/base/pegasus_utils.h:
##########
@@ -106,6 +107,18 @@ std::string c_escape_string(const T &src, bool always_escape = false)
 // ----------------------------------------------------------------------
 int c_unescape_string(const std::string &src, std::string &dest);
 
+template <class T>
+T redact_sensitive_string(const T &src, bool always_redacted = false)

Review Comment:
   It seems the second parameter is never used, how about removing it?



##########
src/server/hotkey_collector.cpp:
##########
@@ -196,7 +196,8 @@ inline void hotkey_collector::change_state_by_result()
         if (!_result.hot_hash_key.empty()) {
             change_state_to_finished();
             LOG_ERROR_PREFIX("Find the hotkey: {}",
-                             pegasus::utils::c_escape_string(_result.hot_hash_key));
+                             pegasus::utils::c_escape_string(

Review Comment:
   Is the c_escape_string always called along with redact_sensitive_string? How about unify to a single function?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@pegasus.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pegasus.apache.org
For additional commands, e-mail: dev-help@pegasus.apache.org