wangbo commented on code in PR #48906:
URL: https://github.com/apache/doris/pull/48906#discussion_r1990501400
##########
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:
It better not, a null value or an invalid value can indicate clearly error
happens here and user can get it.
If a value with correct format but incorrect content may cause user
confused.
--
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]