Skip to main content

Configuration reference

Log Lens reads its settings once from config.php and caches them. Any missing key falls back to a built-in default, so a partial or older file keeps working. The two deployment secrets - LOG_LENS_URL and LOG_LENS_TOKEN - are best set in the environment or a root-level .env file; a real environment variable always wins over .env. See Environment variables.

Top level

KeyDefaultMeaning
LOG_LENS_URL(empty)Canonical base URL, used by the command-line AI skills and when pinning a URL behind a proxy. Empty means the base is derived from the request. Trailing slash trimmed.

auth

KeyDefaultMeaning
auth.token'' (from LOG_LENS_TOKEN)Empty string leaves the API unauthenticated (local-first default). Any non-empty value turns auth on - every request must then send X-Log-Lens-Token: <token> or Authorization: Bearer <token>.

See API key authentication.

ingestion

KeyDefaultMeaning
default_severities['ERROR', 'WARNING']Severities indexed by brand-new application workspaces. Existing workspaces are unaffected; each can change this later in the UI.
log_file_pattern/\.log(?:\.\d+)?$/iPCRE (with delimiters) deciding whether a file name counts as a log. Widen for other names, e.g. /\.(log|out|err)(?:\.\d+)?$/i.
sample_bytes65536Bytes read from a file's head to detect which parser handles it.
capture_limit4194304Max bytes accumulated for a single multiline event body.
message_limit120000Max characters stored per group sample (message, stack, context).
context_preview_limit12000Max characters stored for each occurrence's context preview.

See Choose which severities to index and Which files count as logs.

pagination

KeyDefaultMeaning
default_limit50Default page size for issue-list endpoints.
max_limit200Hard maximum page size.

sync

KeyDefaultMeaning
chunk_size8388608Bytes fetched per round when appending from a connector source.
max_discovered_files10000Ceiling on files a single SSH pattern set may discover.
prefix_hash_bytes1048576Prefix length hashed to reconcile connector streams with manual imports.

ssh

KeyDefaultMeaning
default_port22Default SSH connector port.
connect_timeout10SSH connection timeout in seconds.

database

KeyDefaultMeaning
busy_timeout5000Milliseconds SQLite waits on a locked database before giving up.

retention

Automatically prunes the processed/ archive after each incoming import. Deleting an archived file only removes raw-event retrieval for its occurrences; indexed issues and counts stay intact. 0 disables a rule.

KeyDefaultMeaning
processed_max_age_days0Delete archived logs older than N days.
processed_max_files0Keep only the N newest archived logs.

See Prune the processed archive.