Logs and running processes
Everything Short Leash runs writes to one place you can search and follow: the Logs screen, or leash logs in the terminal.
Logs
The Logs screen shows the output of everything Short Leash runs: PHP for each version, Python workers, dev servers, background processes, services and tunnels. Pick a source on the left; new lines appear as they're written. A source whose process has stopped keeps its lines, with a hollow ring and "Ended" and the time. Inside a site, Logs lists only that site's server, processes and share, then its log files.
Search this log (⌘F, or Ctrl+F on Windows) keeps the lines that match and marks each match, with how many there are. Aa matches case, and .* takes a regular expression; one that isn't valid says "Not a valid pattern". Esc clears the search.
Tunnel logs, those of Pair calls and of shared sites, are left out of the list until you turn on Show tunnel logs; a Pair call's tunnel is named by when it started ("Pair tunnel, 14:02"), and Short Leash keeps the last three that ended. A link to a tunnel's log, from a notification for example, always opens it.
Click a line to mark it, and click it again to let it go. Marking a line pauses Following, so the line stays in view; selecting text, by dragging or double-clicking a word, leaves the mark as it was. Copy for agent, beside Following, copies the marked line with the 20 lines before it and the 5 after, or the last 40 lines the log shows (with a search, the lines that match), ready to paste into a coding assistant. The copy names the source, drops color codes, says the log lines come from your site and its programs, so the assistant treats them as data, not instructions, and names the get_logs tool on leash mcp that reads more.
Open logs on a notification opens the log at the line that explains it, marked. Short Leash keeps the last 2,000 lines of each source in memory, so an older line may be gone: the log then says "This line is no longer in memory." To watch a log while you work on another screen, dock it beside the page or pop it out: see Panels and floating windows.
From the terminal:
leash logs # the site for the current folder
leash logs php:8.4 --follow
leash logs proc:shop:queue-worker -f
Your project's log files
Inside a site, Logs also lists the project's own log files: storage/logs/*.log (Laravel, Statamic, Craft), var/log/*.log (Symfony, Magento), wp-content/debug.log (WordPress; web/app/debug.log with Bedrock), logs/*.log (CakePHP) and log/*.log (Rails). Short Leash reads them where they are and only while the page is open, and never changes them. It opens a file at its last 256 KB and follows new lines every second; when a file is cleared or replaced, as daily logs are, it starts again from the top. If a file can't be read, say while it's being rotated, the page says why above its lines and tries again every second. From the terminal: leash logs file:shop:storage/logs/laravel.log --follow.
Running now
Click the power rail at the top of the window to see everything that's running in one list: sites, PHP pools, background processes, services and shares, with how much memory each uses. Stop any one of them, or Stop all.
Keep running after you quit
Settings › Startup has these switches:
- Open Short Leash when you log in
- Keep sites and services running after you quit Short Leash: quitting closes the window, but your sites stay up. Turn it off to stop everything on quit.
- Keep Short Leash in the Dock when its window is closed (macOS): closing the window always leaves Short Leash in the menu bar. Turn this off and its Dock icon goes too once the window and any floating panels are closed, and comes back when you open Short Leash again, from the menu bar or otherwise.