Add a log.debug when connecting to sqlite file.

This commit is contained in:
voussoir 2021-12-21 16:57:08 -08:00
parent 16688f95e7
commit e982858c28
No known key found for this signature in database
GPG key ID: 5F7554F8C26DACCB

View file

@ -1612,6 +1612,7 @@ class PhotoDB(
raise FileNotFoundError(msg) raise FileNotFoundError(msg)
self.data_directory.makedirs(exist_ok=True) self.data_directory.makedirs(exist_ok=True)
log.debug('Connecting to sqlite file "%s".', self.database_filepath.absolute_path)
self.sql = sqlite3.connect(self.database_filepath.absolute_path) self.sql = sqlite3.connect(self.database_filepath.absolute_path)
if existing_database: if existing_database:
@ -1647,13 +1648,13 @@ class PhotoDB(
path = parent path = parent
path = possible path = possible
log.debug('Found closest PhotoDB at "%s".', path.absolute_path)
photodb = cls( photodb = cls(
data_directory=path, data_directory=path,
create=False, create=False,
*args, *args,
**kwargs, **kwargs,
) )
log.debug('Found closest PhotoDB at %s.', path)
return photodb return photodb
def __del__(self): def __del__(self):