morningman commented on code in PR #48906:
URL: https://github.com/apache/doris/pull/48906#discussion_r1990494180
##########
fe/fe-core/src/main/java/org/apache/doris/plugin/audit/AuditLogBuilder.java:
##########
@@ -109,14 +110,22 @@ private void auditQueryLog(AuditEvent event) throws
IllegalAccessException {
continue;
}
- if (af.value().equals("Timestamp")) {
- continue;
+ Object fieldValue = f.get(event);
+ if (af.value().equals("Time(ms)")) {
+ queryTime = (long) fieldValue;
}
- if (af.value().equals("Time(ms)")) {
- queryTime = (long) f.get(event);
+ if (af.value().equals("Timestamp")) {
+ try {
+ fieldValue = TimeUtils.longToTimeStringWithms((Long)
fieldValue);
+ } catch (Throwable t) {
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("convert query start time failed", t);
+ }
Review Comment:
Need to give `fieldValue` a default value if failed?
--
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]