Billionmail/BillionMail · warning
no log files found
Error message
no log files found
What it means
After iterating day-by-day from start_date to end_date and stat-ing each expected <yyyy-mm-dd>.log file in logDir, if no files exist the function returns this error instead of an empty list. It signals that there is simply no log data for the requested window on this server.
Source
Thrown at core/internal/controller/operation_log/operation_log_v1_get_output_log.go:133
endDate, err := time.Parse(layout, end)
if err != nil {
return nil, fmt.Errorf("invalid end_date: %v", err)
}
if endDate.Before(startDate) {
return nil, fmt.Errorf("end_date must not be before start_date")
}
var files []string
for d := startDate; !d.After(endDate); d = d.AddDate(0, 0, 1) {
fname := filepath.Join(logDir, d.Format("2006-01-02")+".log")
if _, err := os.Stat(fname); err == nil {
files = append(files, fname)
}
}
if len(files) == 0 {
return nil, fmt.Errorf("no log files found")
}
return files, nil
}
View on GitHub (pinned to fc36c76c05)
Solutions
- Verify log files of the form YYYY-MM-DD.log actually exist in the configured logDir
- Check the logDir configuration/mount (Docker volume) matches where logs are written
- Re-run the query with a date range that covers days on which the application actually ran and logged
- If logs were rotated/deleted, restore them from backup or accept the empty result
Example fix
# before curl '.../operation-log/output?start_date=2025-01-01&end_date=2025-01-02' # after (range with existing files) curl '.../operation-log/output?start_date=2026-09-01&end_date=2026-09-05'
Defensive patterns
Strategy: fallback
Validate before calling
// No reliable pre-check via public API; treat as expected empty case: const rangeHasData = lastKnownLogDate === null || new Date(endDate) >= new Date(lastKnownLogDate);
Try / catch
try {
const files = await api.getOutputLog({ start_date, end_date });
} catch (err) {
if (String(err.message).includes('no log files found')) {
return { files: [], message: 'No logs for this range' }; // degrade gracefully
}
throw err;
} Prevention
- Pick date ranges within the deployment's active logging window
- Verify the server's logDir is correctly configured and mounted
- Check log rotation settings so needed files still exist
When it happens
Trigger: Requesting a date range before logging was enabled, dates far in the future, a logDir path that is wrong/misconfigured, or logs deleted/rotated away (os.Stat fails for every candidate file).
Common situations: Fresh deployment with no logs yet; logs stored on a different volume/mount in Docker than the controller's logDir expects; log rotation/cleanup removed old files the user asks for; wrong container queried (querying app logs on a node that doesn't serve them).
Related errors
- unable to determine domain for noreply email
- failed to create email sender: %w
- failed to send confirmation email: %w
- No log files found
- no log files found
AI-assisted analysis of Billionmail/BillionMail@fc36c76c05 (2026-09-05).
Data as JSON: /api/errors/eeda537a412d2b36.
Report an issue: GitHub.