gavinchou commented on code in PR #37894:
URL: https://github.com/apache/doris/pull/37894#discussion_r1678906155
##########
fe/fe-core/src/main/java/org/apache/doris/qe/AuditLogHelper.java:
##########
@@ -47,15 +57,52 @@ 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);
}
}
+ private static String handleStmt(String origStmt, StatementBase
parsedStmt) {
+ int length = Math.min(GlobalVariable.auditPluginMaxSqlLength,
origStmt.length());
+ origStmt = origStmt.replace("\n", " ").substring(0, length);
Review Comment:
\r\n
--
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]