Group logs into modules
Modules let you group related logs (Billing, Auth, Search) so issues carry a label you can filter by. You can create modules by hand, or let Log Lens create and assign them automatically from your folder layout.
Create a module
Give the module a name and, optionally, a slug and a colour:
| Field | Rules | Default |
|---|---|---|
| Name | 1-100 characters, must be unique | - |
| Slug | 1-64 URL-safe characters; auto-derived from the name when omitted | derived from name |
| Colour | Six-digit hex, e.g. #6366f1 | #6366f1 |
When you leave the slug blank, Log Lens builds one from the name: it lowercases the text and replaces every run of non-alphanumeric characters with a dash. "User Billing" becomes user-billing. Names and slugs must be unique, so a duplicate is rejected.
Route logs by folder
The simplest way to assign modules is through your connected directory. Log Lens reads the first folder under the ingest root and treats it as a module:
incoming/
billing/
laravel.log to module "Billing"
auth/
laravel.log to module "Auth"
laravel.log to no module (top-level file)
For each first-level folder, Log Lens finds a matching module or creates one on the fly. The folder name becomes the module name with dashes and underscores turned into spaces and each word capitalised, so user-billing/ creates the module User Billing with slug user-billing. Files sitting directly in the root get no module.
Processed logs are archived under a subfolder named after the module's slug, keeping the archive organised the same way.
Change a module assignment
Reassigning a source to a different module changes how its events are grouped, so Log Lens clears that source's existing events and re-reads the file from the start the next time it ingests. To reapply new folder rules across everything you have already indexed, reindex your logs - module assignments are preserved for sources that have not moved.