关闭 send-code 临时抓包日志
This commit is contained in:
@@ -8,7 +8,7 @@ import { handleDestroyCode } from '../services/platforms/kuaishou-industry/destr
|
||||
import { handleQueryCode } from '../services/platforms/kuaishou-industry/query-code-service.js'
|
||||
import { handleConsumeCode } from '../services/platforms/kuaishou-industry/consume-code-service.js'
|
||||
import { buildIndustryErrorResponse } from '../services/platforms/kuaishou-industry/response.js'
|
||||
import { createRequestId, logCapture, logIntegration } from '../utils/logger.js'
|
||||
import { createRequestId, logIntegration } from '../utils/logger.js'
|
||||
|
||||
const router = Router()
|
||||
|
||||
@@ -24,7 +24,6 @@ const industryRateLimit = createRateLimitMiddleware({
|
||||
router.post('/send-code', industryRateLimit, async (req, res) => {
|
||||
const requestId = createRequestId('ksind')
|
||||
const startedAt = Date.now()
|
||||
const mergedParams = mergeRequestParams(req)
|
||||
|
||||
logIntegration('[kuaishou-industry/send-code]', '收到快手行业电子凭证发码请求', {
|
||||
requestId,
|
||||
@@ -35,23 +34,9 @@ router.post('/send-code', industryRateLimit, async (req, res) => {
|
||||
body: req.body,
|
||||
})
|
||||
|
||||
logCapture('[kuaishou-industry/send-code]', '快手通知商家发码消息', {
|
||||
requestId,
|
||||
receivedAt: new Date().toISOString(),
|
||||
method: req.method,
|
||||
originalUrl: req.originalUrl,
|
||||
ip: req.ip,
|
||||
params: mergedParams,
|
||||
}, { channel: 'send-code', sanitize: false })
|
||||
|
||||
try {
|
||||
const params = mergeRequestParams(req)
|
||||
const result = await handleSendCode(params)
|
||||
logCapture('[kuaishou-industry/send-code]', '快手通知商家发码处理完成', {
|
||||
requestId,
|
||||
durationMs: Date.now() - startedAt,
|
||||
result,
|
||||
}, { channel: 'send-code', sanitize: false })
|
||||
logIntegration('[kuaishou-industry/send-code]', '发码处理完成', {
|
||||
requestId,
|
||||
durationMs: Date.now() - startedAt,
|
||||
@@ -60,14 +45,6 @@ router.post('/send-code', industryRateLimit, async (req, res) => {
|
||||
res.status(200).json(result)
|
||||
} catch (error) {
|
||||
const message = error instanceof Error ? error.message : '系统异常'
|
||||
logCapture('[kuaishou-industry/send-code]', '快手通知商家发码处理失败', {
|
||||
requestId,
|
||||
durationMs: Date.now() - startedAt,
|
||||
error: {
|
||||
name: error instanceof Error ? error.name : 'Error',
|
||||
message,
|
||||
},
|
||||
}, { channel: 'send-code', sanitize: false })
|
||||
logIntegration('[kuaishou-industry/send-code]', '发码处理失败', {
|
||||
requestId,
|
||||
durationMs: Date.now() - startedAt,
|
||||
|
||||
Reference in New Issue
Block a user