Enable debug_level log in shared Redis service server
search cancel

Enable debug_level log in shared Redis service server

book

Article ID: 404458

calendar_today

Updated On:

Products

VMware Tanzu Platform Data

Issue/Introduction

Enabling debug level logging in a shared Redis server can be a powerful tool—especially when you're troubleshooting elusive issues or analyzing Redis internals.

This article introduces the way to enable debug level log in shared Redis service server and helps collect useful information when hitting an error such as running smoke_test errand. 

Resolution

Here are detailed steps on enabling the debug_level log. Please be noted that the mentioned method to change log level is not persistent over upgrade or Redis BOSH instance recreate.

1.) Bosh ssh into the Redis broker VM

2.) Change the loglevel to "debug" from the default value, "notice".

Before 

cf-redis-broker/8b6####bd6:/var/vcap/jobs/cf-redis-broker/config# grep loglevel redis.conf 
loglevel notice

After

cf-redis-broker/8b6####bd6:/var/vcap/jobs/cf-redis-broker/config# grep loglevel redis.conf 
loglevel debug

3.) Make effective by running as root "monit restart all".

 

We can see the much more detailed information is available in the Redis server, 

cf-redis-broker/8b6####bd6:/var/vcap/sys/log/redis/926####09fd# tail redis-server.log 
117613:M 17 Jul 2025 08:01:37.657 * Running mode=standalone, port=42211.
117613:M 17 Jul 2025 08:01:37.661 # Warning: Could not create server TCP listening socket ::*:42211: unable to bind socket, errno: 97
.
.
.
117613:M 17 Jul 2025 08:18:18.893 - Accepted 192.###.###.188:5####4
117613:M 17 Jul 2025 08:18:20.510 - DB 0: 1 keys (0 volatile) in 7 slots HT.
117613:M 17 Jul 2025 08:18:20.512 . Total: 8 clients connected (0 replicas), 995288 (971.96K) bytes in use
117613:M 17 Jul 2025 08:18:25.546 - DB 0: 1 keys (0 volatile) in 7 slots HT.
117613:M 17 Jul 2025 08:18:25.546 . Total: 8 clients connected (0 replicas), 995288 (971.96K) bytes in use
117613:M 17 Jul 2025 08:18:28.901 - Accepted 192.168.6.188:50934
117613:M 17 Jul 2025 08:18:30.588 - DB 0: 1 keys (0 volatile) in 7 slots HT.
117613:M 17 Jul 2025 08:18:30.590 . Total: 9 clients connected (0 replicas), 997120 (973.75K) bytes in use
117613:M 17 Jul 2025 08:18:35.628 - DB 0: 1 keys (0 volatile) in 7 slots HT.
117613:M 17 Jul 2025 08:18:35.629 . Total: 9 clients connected (0 replicas), 997120 (973.75K) bytes in use

 

By interpreting the log level symbol, it confirms the debug log has been generated. 

  • . → debug
  • - → verbose
  • * → notice
  • # → warning

More information can be found at https://build47.com/redis-log-format-levels/.

Additional Information

Caveats

  • Performance Overhead Debug logging is verbose and can impact performance, especially in production environments.

  • Log Volume It can quickly generate large log files—make sure log rotation is configured properly.