The verbosity level in Memcached is used to set the debug information's detail level that the Memcached server will output. This can be handy when debugging your application, particularly when you're dealing with cache related issues.
In Go, the
gomemcache package doesn't provide a direct interface to change verbosity levels of the memcached server. Instead, this should be done on the memcached server side, typically through command line options when starting the server, or by sending commands directly to it.
Here's an example of how to start a memcached server with verbosity levels set through command line options:
This starts the memcached server in verbose mode. Optionally, an additional
v can be added (i.e.,
-vvv) for even more detailed logs.
When using telnet to interact with your memcached server, you can change the verbosity level as follows:
This sets the verbosity level to 2.
Can I change Memcached's verbosity level from Go code directly?
gomemcache package doesn't provide a direct method to control the verbosity level of the memcached server. This should be done at the server level.
Is there a way to turn off memcached logging completely?
Yes, you can do this by setting the verbosity level to 0.