bugfix/wwwroot/api/read_log.dspy
yumoqing 3406783d13 feat: bugfix module - SQL query, log read, and log tail APIs
- 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
2026-06-04 16:41:03 +08:00

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