DEV Community

Cover image for Reading Server Logs Should Not Require a journalctl Cheat Sheet
Christian Ahrweiler
Christian Ahrweiler

Posted on • Originally published at Medium on

Reading Server Logs Should Not Require a journalctl Cheat Sheet

Beaver Logs finds the relevant logs on your server and presents the latest entries in a clean Mac app.

A website suddenly returns a 502 error. An SSH login fails. Fail2ban blocks an address, PHP stops processing a request, or a systemd service refuses to start.

The answer is probably in a log.

Finding that answer, however, often begins with another question:

Which log should I look at?

Some applications write to files in /var/log. Others send their messages to the systemd journal. The correct file path varies between Linux distributions, and journalctl comes with its own collection of options.

Then there is the pager.

You run a command, see part of the output, press Return several times, wonder whether you have reached the latest entry, and eventually press q to escape. It works, but it is not particularly transparent.

That is the problem Beaver Logs is designed to solve.

Select a server and scan its services

Beaver Logs connects directly to a Linux server over SSH. Nothing has to be installed on the server.

When you add a server, Beaver Logs can scan it for common services and log sources. It may find services such as:

  • Apache
  • PHP-FPM
  • Fail2ban
  • Unbound
  • Other systemd services

It also checks known locations for regular log files.

The result is presented as a checklist. You decide which logs should be available for that server. If the server configuration changes later, an Update button runs the scan again.

Each server keeps its own selected log list.

System journals and regular log files in one place

Linux logs generally come from two different sources.

Traditional logs are regular files, such as:

/var/log/nginx/error.log
/var/log/auth.log
/var/log/fail2ban.log
Enter fullscreen mode Exit fullscreen mode

Modern system services often write to the systemd journal instead. These entries are normally accessed with journalctl.

Beaver Logs handles both.

For a regular file, it retrieves only the latest requested lines. It does not download a potentially multi-gigabyte log file just to show its ending.

For a systemd service, it requests the latest journal entries without invoking the interactive pager.

From the user’s perspective, both behave the same way:

  1. Select a server.
  2. Select a log.
  3. Read the latest entries.

The underlying storage mechanism no longer matters.

The latest entries, clearly defined

One of the confusing things about command-line log tools is not always knowing exactly what is being shown.

Is this the entire log? The latest page? Entries since boot? Is the program waiting for new data?

Beaver Logs makes that explicit.

Choose the latest:

  • 100 entries
  • 500 entries
  • 1,000 entries
  • 5,000 entries

The app shows when the log was last read. Click Update to retrieve its current state.

Beaver Logs is deliberately not a permanent monitoring service. It does not continuously stream logs, run in the background, or build a central log archive.

Open it when something needs checking. Read the relevant logs. Close it when you are done.

Add logs Beaver Logs cannot discover

Automatic detection covers common services, but every server is different.

An application may write to:

/opt/myapp/logs/error.log
Enter fullscreen mode Exit fullscreen mode

A WordPress installation may use:

/var/www/example.com/wp-content/debug.log
Enter fullscreen mode Exit fullscreen mode

Your own server software may run as:

my-service.service
Enter fullscreen mode Exit fullscreen mode

Beaver Logs lets you add custom sources with a readable name and either a file path or systemd unit.

Once added, a custom log behaves like every automatically discovered log and remains available in that server’s sidebar.

A reader made for logs

The center of Beaver Logs is intentionally simple: a large, monospaced, scrollable view.

You can search within the retrieved content, move between matches, copy relevant entries, and wrap long lines at the window edge. Disable line wrapping when you prefer each log entry to remain on one visual line.

There are no pager commands to remember and no need to press Return repeatedly to reveal the next part.

Direct, temporary and private

Beaver Logs connects directly from your Mac to your server using SSH.

There is:

  • No server agent
  • No Beaver account
  • No cloud log collection
  • No external analysis
  • No permanent local log archive

Retrieved content is kept in memory for the current session. It disappears when the app is closed unless you explicitly export it.

Not another observability platform

Large infrastructures may need centralized logging, dashboards, alerts and long-term analysis.

Many developers and self-hosters need something much smaller.

They operate a few VPS instances, web servers, mail servers or private services. When something goes wrong, they want to see the relevant entries without first looking up a file path or reconstructing the correct journalctl command.

That is Beaver Logs:

Server logs without the Terminal.

Learn more about The Beaver Tools at beavertools.app.

Download on App-Store.

https://apps.apple.com/us/app/beaver-logs/id6798559590

Top comments (0)