gavinchou commented on code in PR #37894:
URL: https://github.com/apache/doris/pull/37894#discussion_r1679357383
##########
fe/fe-core/src/main/java/org/apache/doris/qe/AuditLogHelper.java:
##########
@@ -47,15 +58,56 @@ public class AuditLogHelper {
public static void logAuditLog(ConnectContext ctx, String origStmt,
StatementBase parsedStmt,
org.apache.doris.proto.Data.PQueryStatistics statistics, boolean
printFuzzyVariables) {
try {
+ origStmt = handleStmt(origStmt, parsedStmt);
logAuditLogImpl(ctx, origStmt, parsedStmt, statistics,
printFuzzyVariables);
} catch (Throwable t) {
LOG.warn("Failed to write audit log.", t);
}
}
+ public static String handleStmt(String origStmt, StatementBase parsedStmt)
{
+ int length = Math.min(GlobalVariable.auditPluginMaxSqlLength,
origStmt.length());
Review Comment:
return origstmt if origStmt.length < maxLength;
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]