Remote › Logs
PremiumThe Remote logs page tails log files on your servers over the saved SSH connection, such as nginx's error log or a shop's log. Only what is new travels. You see the lines in the same view as local logs, with search, copy and export. Remote logs are a Premium feature.
What you do here
- Add a remote log: register a log file on a server.
- When it is read: on opening, live every few seconds, or on a schedule.
- Search, copy and export lines as text, see below.
Page layout
- Header: title and short description. On the right Add, Refresh (reads the selected log right away), Live with the choice of interval (5 to 10 s), edit (pencil) and remove (bin).
- Risk notice: the strip Caution: working directly on the server, as on every Remote page.
- Info line for the selected log: server, path, schedule (such as every 1 min, cron … or on demand), schedule paused, size of the file and read with the time of the last read. If the file was rotated or truncated, a mark says it started over.
- Connections (left): your servers, under each server its logs with name and path. A click on a log shows it on the right and picks its server for all Remote pages. A log whose last read failed carries a red warning icon.
- The view (right): the lines of the selected log.
Without any log, the view asks you to add a log file.
The view
- Search… filters the lines, next to it it says … of … lines. WebDonkey keeps the search for the session.
- Copy and Export as text take exactly the lines the search shows.
- Lines of common formats (Apache and nginx, PHP and PHP-FPM, Laravel and Monolog, syslog, most logs with an ISO timestamp) show time and level apart: errors and warnings coloured with an icon, debug dimmed. Unknown formats stay plain lines.
- Lines without a timestamp of their own, such as a stack trace, sit folded under the entry before them. A mark gives the number of further lines. A click unfolds the entry.
- The list shows the newest 2,000 entries. Older ones are hidden; search, copy and export still cover all of them.
- The list follows the end. If you scrolled up while new lines come in, New lines takes you back to the end.
If the server cannot be reached, the error shows above the view. The lines read so far stay.
Free and Premium
Remote logs are Premium. Without Premium a lock lies over the view, and scheduled reads do not run. Prices are at webdonkey.io/pricing.
From the command line
wd remote logs lists the remote logs, wd remote logs tail reads one and prints its end, with -f continuously. More under Servers (Remote).
Add a remote log Premium
A remote log is an entry for a log file on a server: which server, which file, what it is called and when WebDonkey looks for new lines. The file itself stays on the server; WebDonkey only reads it.
Where to find it
Sidebar Remote › Logs, then Add at the top right. The dialog is called Add remote log. You pick an existing log on the left and open it with the pencil (Edit remote log).
How to do it
- Pick the server on the left and click Add. Without an SSH connection the button is locked; add one under Connections first.
- Check the Server.
- Under Log file on the server, enter the path, such as
/var/www/shop/var/log/prod.log, or pick the file with Browse… (Choose the log file). - Enter a Name, such as "Shop · prod.log". If you pick the file with Browse… while the name is still empty, WebDonkey fills in the file name.
- At Check for new lines, choose how often it is read, see When it is read.
- Click Save. The log appears on the left under its server and is read right away.
Save unlocks once server, name and path are there.
Fields and options
| Field | Meaning |
|---|---|
| Server | The SSH connection. The server picked on the left is preselected. |
| Log file on the server | The path of the file. It must be absolute or start with ~/. Browse… shows the server; click a file and Use file (or double-click) to take it. |
| Name | What the log is called in the list. |
| Check for new lines | Only when opened / live, every 30 s, every 1 min (default), every 5 min, every 15 min, every 1 h, or Cron expression with your own expression (default */5 * * * *). |
| Schedule active | Turns scheduled reading on or off. Default: on. |
What happens in the background
- The first read takes the last 500 lines. Every later one first asks for the file's size and identity and then fetches only what was added since the last read.
- If the file got shorter or is a different one (rotated or truncated), WebDonkey starts over with its last lines and says so in the info line.
- What was read is kept in memory, up to 2 MB per log. Only the entry itself is stored, not the content. After a restart WebDonkey reads the log again when you open it.
Edit and remove
- The pencil opens Edit remote log with the same fields.
- The bin asks Remove remote log?. The log leaves the list; the file on the server is not touched.
Troubleshooting
| What you see | Why | What to do |
|---|---|---|
| The path must be absolute (or start with ~/). | The path is relative. | Enter the full path or pick it with Browse…. |
| The log file does not exist on the server (anymore). | File deleted or wrong path. | Check the path. |
| The SSH user may not read this log file. | Missing read permission. | Adjust the permissions on the server or use another user. |
| That is not a regular file … | A folder, device or pipe was picked. | Pick the log file itself. |
| The interval must be at least 5 seconds. | The interval is too short. | Choose a longer interval. |
See also
When it is read Premium
WebDonkey reads a remote log in three ways: when you open it, live every few seconds while it is on screen, and on a schedule in the background. Each time only what is new travels.
Where to find it
Sidebar Remote › Logs. Refresh and Live sit at the top right; the schedule is set in the log's dialog under Check for new lines.
On opening
When you pick a log, WebDonkey shows what it has read so far. If it has nothing yet, it reads right away. Refresh reads again at any time.
Live
- Pick the log.
- Next to Live, set the interval: 5, 6, 7, 8, 9 or 10 s (default 5 s).
- Click Live. The icon pulses green, and the log is read again at the interval set.
Live applies only to the one log you are looking at. Switching the log or leaving the page ends it. WebDonkey keeps the interval for the session.
On a schedule
In the dialog, under Check for new lines, set an interval (every 30 s to every 1 h) or a Cron expression. Schedule active turns it on and off. When it is off, the info line says schedule paused. With Only when opened / live nothing is read on a schedule, and the info line says on demand.
Reading happens while WebDonkey runs. While WebDonkey is closed, the schedule rests. The info line shows at read when it last fetched.
What happens in the background
- Every read goes through the server's saved SSH connection.
- Live and schedule can meet. There is still only one read per log at a time.
- If a lot arrived since the last read (more than 1 MB), WebDonkey skips ahead to the newest part.
- WebDonkey Editor has no background schedule. There the selected log is read again at its own interval while it is on screen. Logs with a cron expression are read on demand only there.
Free and Premium
All three ways are part of Premium. Without Premium no schedule runs either.
Troubleshooting
| What you see | Why | What to do |
|---|---|---|
| Red box with an error above the view | The server could not be reached or the file not read. With live or a schedule, a note below says the next turn tries again. The lines read so far stay. | Check the connection, otherwise just wait. |
| Live is locked | No log is selected. | Pick a log on the left. |
| No new lines despite a schedule | Schedule active is off, or WebDonkey was closed. | Turn the schedule on, click Refresh. |