Client Logger

faunadb.client_logger.logger(logger_func)

Function that can be the observer for a FaunaClient. Will call logger_func on a string representation of each RequestResult.

Use it like:

def log(logged):
  print logged
client = FaunaClient(observer=logger(log), ...)
client.ping() # Calls `log`
Parameters:logger_func – Callback taking a string to be logged.
faunadb.client_logger.show_request_result(request_result)

Translates a RequestResult to a string suitable for logging.