1
This commit is contained in:
@@ -115,7 +115,7 @@ export async function invoke_extension_action(action_name, action_payload, optio
|
||||
const log_enabled = cfg.crawler.log_invoke_action;
|
||||
if (log_enabled) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log('[invoke_extension_action] start', {
|
||||
console.log(`[${new Date().toLocaleString()}] [invoke_extension_action] start`, {
|
||||
action_name,
|
||||
has_payload: !!action_payload,
|
||||
keys: action_payload && typeof action_payload === 'object' ? Object.keys(action_payload).slice(0, 20) : []
|
||||
@@ -178,14 +178,17 @@ export async function invoke_extension_action(action_name, action_payload, optio
|
||||
|
||||
if (log_enabled) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log('[invoke_extension_action] ok', { action_name, cost_ms: Date.now() - started_at });
|
||||
console.log(`[${new Date().toLocaleString()}] [invoke_extension_action] ok`, {
|
||||
action_name,
|
||||
cost_ms: Date.now() - started_at
|
||||
});
|
||||
}
|
||||
|
||||
return action_res;
|
||||
} catch (err) {
|
||||
if (log_enabled) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log('[invoke_extension_action] fail', {
|
||||
console.log(`[${new Date().toLocaleString()}] [invoke_extension_action] fail`, {
|
||||
action_name,
|
||||
cost_ms: Date.now() - started_at,
|
||||
error: (err && err.message) || String(err)
|
||||
|
||||
Reference in New Issue
Block a user