MCPcopy Index your code
hub / github.com/apache/cassandra-python-driver / format_log_context

Function format_log_context

cassandra/cqlengine/connection.py:45–53  ·  view source on GitHub ↗

Format log message to add keyspace and connection context

(msg, connection=None, keyspace=None)

Source from the content-addressed store, hash-verified

43
44
45def format_log_context(msg, connection=None, keyspace=None):
46 """Format log message to add keyspace and connection context"""
47 connection_info = connection or 'DEFAULT_CONNECTION'
48
49 if keyspace:
50 msg = '[Connection: {0}, Keyspace: {1}] {2}'.format(connection_info, keyspace, msg)
51 else:
52 msg = '[Connection: {0}] {1}'.format(connection_info, msg)
53 return msg
54
55
56class UndefinedKeyspaceException(CQLEngineException):

Callers 7

__create_keyspaceFunction · 0.90
_sync_tableFunction · 0.90
_sync_typeFunction · 0.90
_update_optionsFunction · 0.90
setupMethod · 0.85
handle_lazy_connectMethod · 0.85
executeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected