Skip to main content


The Aerospike Ruby client contains a logging interface useful for debugging and informational purposes. By default, logging is disabled.

Setting the Logger

To enable the log facility, provide an instance of Logger:

# Log to a StringIO instance to make sure no exceptions are raised by our
# logging code.
Aerospike.logger =, Logger::DEBUG)

Standard Logger levels control the log verbosity level.


If the gem is loaded in Rails, the Rails logger is automatically selected.