SorterOS — Operate
Logs
How-to guideRead the machine's own log in the browser, narrowed to the errors, warnings or text you are after. Use it when something went wrong and the dashboard does not say why.
AI-generated first draft. Written from SorterOS's own source, not from a running machine. It has no screenshots yet, and the wording on screen has not been checked against a real machine.
The Logs page shows the end of the log file the backend is writing, with a search box and a level filter on top. It only reads. Opening it changes nothing on the machine.
Open it
There is no entry for it in the top menu. Go to /logs on the machine's address (http://sorter.local/logs on the SorterOS image).
Turn the log file on
The page reads a log file, not the system journal. A standard install does not write that file, so both sources read Unavailable and the right-hand panel says No log source is selected. To switch it on:
- Add the line
export DUMP_BACKEND_LOGS=1to the.envfile in thesoftwarefolder of the sorter-v2 checkout on the machine. - Restart the whole backend service so it reads the file again: Restart the machine in the ⋯ System menu does it, or see the full restart in Dev flow. Restart the backend in the same menu is not enough, because it keeps the old environment.
- Open the Logs page and press Refresh.
The backend then starts a new log file in the logs folder each time it starts, named after the date and time. It is off by default because these files can grow very large at the default level and have filled SD cards. To keep that in check the backend deletes the oldest log files once they total more than 1 GB.
Which lines get written depends on DEBUG_LEVEL in the same .env. The installer and the SorterOS image set it to 2, which writes errors, warnings and info. Debug lines are written only at 3 or higher, so with the stock value the Debug only filter below finds nothing.
The sources
The Sources list on the left has two entries. Each shows its size, the file it is reading, and when that file was last updated.
- Machine Backend: the current sorter runtime and backend process output. This is the one you want. It is selected automatically when it is available.
- Machine API: logs of a standalone, API-only machine process, if one exists. It is Unavailable unless such a process has written a log.
An Unavailable source is greyed out and cannot be selected. Click an available one to read it. The panel on the right is headed with its name and the full path of the file.
Controls
The row at the top right of the page:
- Lines: how many of the newest lines to load: 200, 400 (the default), 800 or 1500. The machine reads at most the last 512 KB of the file, so on a chatty log you can get fewer lines than you asked for.
- Auto refresh: off by default. When on, the page reloads the log every 3 seconds, and rechecks the list of sources every 30 seconds. Switch it on to watch the machine live, off to read without the page moving under you.
- Wrap lines: on by default. When off, each line stays on one row and scrolls sideways.
- Refresh reloads the sources and the log once.
The page does not update on its own unless Auto refresh is on. Lines appear oldest first, so the newest is at the bottom.
Read a line
Lines the backend wrote in its usual form, [date time] [LEVEL] message, are split into a timestamp, a colored badge and the message. A line that is not in that form, such as the extra lines of an error trace or text from another program, gets no timestamp and the Other badge.
- Error (red): lines tagged
ERRORorCRITICAL. - Warning (amber): lines tagged
WARNorWARNING. - Info (blue) and Debug (grey): lines tagged
INFOandDEBUG. - Other (grey): everything else.
Search and filter
Above the lines:
- The search box keeps only lines containing what you type, ignoring capitals. It looks at the whole line, so you can search a message, an error name, a part ID or a camera name. It searches only the lines loaded, so raise Lines to search further back.
- Level offers All levels, Errors only, Warnings only, Info only, Debug only and Other or raw only. It combines with the search: a line must pass both.
- The badges show N matching lines after your filters, then Errors, Warnings and Info counts for all the loaded lines. The counts do not change when you filter.
When nothing passes, the panel says No log lines match the current filters.
What to do with it
- Something just failed. Press Refresh, set Level to Errors only, and read from the bottom. Then set it back to All levels and find the same time to see what the machine was doing around the error.
- A specific piece or camera misbehaves. Search for its part ID or camera name.
- Watching a run. Switch Auto refresh on and watch the Errors and Warnings counts. A rising count is worth a look.
- Reporting a problem. Note the machine's state from the dashboard and copy the relevant lines from the page. Start from SorterOS troubleshooting, which lists known symptoms and their fixes.
If the page shows a red banner, the machine could not be reached or did not return the log. The banner carries the reason.