- execute_sql.dspy: SELECT-only SQL execution with pagination - read_log.dspy: read last N lines from whitelisted log files - tail_log.dspy: incremental log monitoring from last position - RBAC: developer role only - Security: SQL validation, log file whitelist
9 lines
228 B
Plaintext
9 lines
228 B
Plaintext
filename = params_kw.get('filename') or ''
|
|
lines = int(params_kw.get('lines') or 500)
|
|
|
|
if not filename:
|
|
return {'status': 'error', 'error': '缺少 filename 参数'}
|
|
|
|
result = await read_log_file(filename, lines)
|
|
return result
|