Hera log detail query toolkit for querying log details by spaceId, storeId, tailName and time range. Use this when you need to query Hera log information programmatically.
View on GitHubJanuary 18, 2026
Select agents to install to:
npx add-skill https://github.com/XiaoMi/mone/blob/008a70860da4ecc95d0a5d82607b10c341dda0c1/jcommon/skills/hera/SKILL.md -a claude-code --skill heraInstallation paths:
.claude/skills/hera/# Hera Log Query Guide
## Overview
This guide covers Hera log detail query operations using Python scripts. The skill provides functionality to query Hera log details with various filters including spaceId, storeId, input search terms, tailName, and time ranges.
## Quick Start
```python
import sys
sys.path.append('scripts')
from hera_log_detail_query import query_log_detail
# Query logs with basic parameters
result = query_log_detail(
space_id=123,
store_id=456,
tail_name="test-tail-name"
)
# Query logs with all parameters
result = query_log_detail(
space_id=123,
store_id=456,
tail_name="test-tail-name",
input_text="error message",
start_time="1638316800000",
end_time="1638320400000"
)
```
## Main Function
### query_log_detail - Query Hera Log Details
Query Hera log details with filters.
**Parameters:**
- `space_id` (int, required): Space ID
- `store_id` (int, required): Store ID
- `tail_name` (str, required): Tail name, e.g., "test-tail-name"
- `input_text` (str, optional): Search input content, may contain special characters like quotes
- `start_time` (str, optional): Query start time in milliseconds timestamp string. Defaults to 1 hour ago
- `end_time` (str, optional): Query end time in milliseconds timestamp string. Defaults to current time
- `api_url` (str, optional): API endpoint URL. Uses default from environment if not specified
**Returns:**
- JSON response from Hera API containing log details
**Example:**
```python
from hera_log_detail_query import query_log_detail
# Basic query
result = query_log_detail(
space_id=123,
store_id=456,
tail_name="my-app-logs"
)
# Query with search term
result = query_log_detail(
space_id=123,
store_id=456,
tail_name="my-app-logs",
input_text="ERROR"
)
# Query with custom time range
import time
end_time = int(time.time() * 1000)
start_time = end_time - 3600000 # 1 hour ago
result = query_log_detail(
space_id=123,
store_id=456,
tail_name