Find and read Redis server logs

Locate the Redis server log from its active configuration, follow file or container output, and distinguish server logs from the in-memory slow log.

Best practices
Illustration of monitoring and troubleshooting application behavior

Ask Redis which log destination it is using:

redis-cli CONFIG GET logfile
redis-cli CONFIG GET loglevel

Connect to the intended instance with its required authentication and TLS settings. CONFIG access may be restricted, especially on managed services; in that case, inspect the service configuration or the provider's logging interface.

Follow the configured destination

A distribution package might write to /var/log/redis/redis-server.log. That is a common packaging choice, not a universal Redis default.

# Use the path returned by your configuration.
tail -f /var/log/redis/redis-server.log

# Use the actual service or container name.
journalctl -u redis-server -f
docker logs -f redis-container

logfile "" sends server logs to standard output. A foreground process under systemd or Docker can have that output captured by the service manager or container runtime. When Redis daemonizes while logging to standard output, output can instead go to /dev/null; an empty path does not guarantee that a journal exists.

Set a file destination

In the configuration file actually loaded at startup:

logfile /var/log/redis/redis.log
loglevel notice

Use a writable directory owned or accessible by the Redis service account. Common levels include debug, verbose, notice, and warning; choose a level that fits the investigation and log volume.

In Redis 8.2, logfile is an immutable startup setting: CONFIG SET logfile cannot change it. Update the managed configuration and apply it through a planned service restart. Containers must mount the intended file and start Redis with that file explicitly.

The logging level can be changed at runtime where authorized:

redis-cli CONFIG SET loglevel notice

Record and restore the previous level after a temporary investigation. Runtime changes to mutable settings do not necessarily survive restart; update the managed configuration, or use CONFIG REWRITE only when appropriate for how that instance's configuration is maintained. Check the deployed version's supported settings rather than assuming every option accepts CONFIG SET.

The slow log is separate

redis-cli SLOWLOG GET 10

This reads recent slow-command entries from memory. It does not read the server log file, and changing logfile does not redirect slow-log entries into that file.

If a log file is empty, check whether you are looking at the active path, whether the selected level excludes the events you expect, and whether disk space and directory permissions allow writes. For centralized collection, validate a newly emitted server message before configuring a file reader.

The upstream Redis configuration example documents output destinations and logging levels.

Get a tailored plan

Contact us

Join the community

Scan with WeChat
to join the community

Try Guance

Start online and pay only for what you use.

Get started

Choose a Guance plan

Code hosting