Skip to content

Clarification: Logging Behavior in LocalAI β€” Job Events & HTTP LogsΒ #8520

@localai-bot

Description

@localai-bot

Hi @mudler,

After deep investigation into #8449, here's a clarification on logging behavior:

  1. 🚫 HTTP Request Logs (e.g., /api/resources) are NOT generated by LocalAI.

    • These come from reverse proxies like Nginx or Traefik.
    • βœ… Fix: Configure your proxy to set log level to warn or error for health check endpoints.
  2. πŸ”„ Model Download Progress Logs are currently commented out in pkg/downloader/huggingface.go:

    //log.Debug().Msgf("Downloading %s: %s/%s (%.2f%%)", pw.fileName, formatBytes(pw.written), formatBytes(pw.total), percentage)
    • βœ… Suggested fix: Uncomment and upgrade to xlog.Info(...) to make progress visible at INFO level.
  3. 🧩 Job Lifecycle Events (job started, job finished) are not currently implemented.

    • These are not present in the codebase (pkg/job/ is empty).
    • βœ… Feature Request: Consider implementing a job manager with xlog.Info events for model load/start/stop.

This is not a bug β€” it's a gap between user expectation and architectural reality.

I recommend:

  • Upgrading download logs to INFO (easy fix)
  • Adding job events as a feature (enhancement)
  • Documenting proxy log filtering as the solution for HTTP noise

Let me know if you'd like a PR for #2 above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions