Skip to content

Commit

Permalink
🎨 新增请求日志时一并写入创建时间
Browse files Browse the repository at this point in the history
  • Loading branch information
hengboy committed Apr 24, 2022
1 parent 636c081 commit 91f34ea
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public class LoggingDataSourceStorage implements LoggingStorage {
private static final String SQL_INSERT_LOG = "insert into logging_request_logs (lrl_id, lrl_service_detail_id, lrl_trace_id, lrl_parent_span_id, lrl_span_id,\n" +
" lrl_start_time, lrl_end_time, lrl_http_status, lrl_request_body, lrl_request_headers,\n" +
" lrl_request_ip, lrl_request_method, lrl_request_uri, lrl_response_body,\n" +
" lrl_response_headers, lrl_time_consuming,lrl_request_params,lrl_exception_stack) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?);";
" lrl_response_headers, lrl_time_consuming,lrl_request_params,lrl_exception_stack,lrl_create_time) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?);";
/**
* Insert Global Log SQL
*/
Expand Down Expand Up @@ -158,6 +158,7 @@ public String insertLog(String serviceDetailId, MinBoxLog log) throws SQLExcepti
ps.setLong(16, log.getTimeConsuming());
ps.setString(17, log.getRequestParam());
ps.setString(18, log.getExceptionStack());
ps.setTimestamp(19, Timestamp.valueOf(log.getCreateTime()));
ps.executeUpdate();
ps.close();
closeConnection(connection);
Expand Down

0 comments on commit 91f34ea

Please sign in to comment.