Client Logger¶
-
faunadb.client_logger.
logger
(logger_func)¶ Function that can be the
observer
for aFaunaClient
. Will calllogger_func
on a string representation of eachRequestResult
.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.