| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
| @staticmethod | ||
| def find(transaction, table_name, columns, keyset): | ||
| """Obtains rows with primary_keys from the given table.""" | ||
| _logger.debug('Find table=%s columns=%s keys=%s', |
There was a problem hiding this comment.
the string interpolation format currently being used in this project is:
'{value}'.format(value=<value>)
Sorry, something went wrong.
There was a problem hiding this comment.
logging methods are exception to that to avoid constructing the string if it is not going to be printed(level criteria not met, etc)
Sorry, something went wrong.
| @staticmethod | ||
| def sql_query(transaction, query, parameters, parameter_types): | ||
| """Runs a read only SQL query.""" | ||
| _logger.debug('%s\n%s\n%s', query, parameters, parameter_types) |
There was a problem hiding this comment.
this should indicate that the log is from executing a sql query
Sorry, something went wrong.
There was a problem hiding this comment.
done
Sorry, something went wrong.
There was a problem hiding this comment.
ok, makes sense
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
this setup seems to be best practices for a library. there are probably other places we can add loggin, I only added to api for now.
If a client wants to see these logs, they need to:
logging.getLogger('spanner_orm').setLevel(logging.DEBUG)