Bump some logging statements to DEBUG
Any action that takes captures ends up with a log that's full of capture write operations, because each new capture generates 6-10 messages. I'm moving said messages to DEBUG because I don't think they are important any more, and they do clutter up the log.
This commit is contained in:
parent
315ee0950b
commit
1339c23757
2 changed files with 9 additions and 9 deletions
|
|
@ -111,13 +111,13 @@ class CaptureObject(object):
|
||||||
self.stream.write(s)
|
self.stream.write(s)
|
||||||
|
|
||||||
def flush(self):
|
def flush(self):
|
||||||
logging.info("Writing image data to disk %s", self.file)
|
logging.debug("Writing image data to disk %s", self.file)
|
||||||
with open(self.file, "wb") as outfile:
|
with open(self.file, "wb") as outfile:
|
||||||
outfile.write(self.stream.getbuffer())
|
outfile.write(self.stream.getbuffer())
|
||||||
self.stream.close()
|
self.stream.close()
|
||||||
logging.info("Writing metadata to disk %s", self.file)
|
logging.debug("Writing metadata to disk %s", self.file)
|
||||||
self._init_metadata()
|
self._init_metadata()
|
||||||
logging.info("Finished writing to disk %s", self.file)
|
logging.debug("Finished writing to disk %s", self.file)
|
||||||
|
|
||||||
def open(self, mode):
|
def open(self, mode):
|
||||||
return open(self.file, mode)
|
return open(self.file, mode)
|
||||||
|
|
@ -179,7 +179,7 @@ class CaptureObject(object):
|
||||||
self.annotations = image_metadata.get("annotations")
|
self.annotations = image_metadata.get("annotations")
|
||||||
|
|
||||||
def read_full_metadata(self) -> dict:
|
def read_full_metadata(self) -> dict:
|
||||||
logging.info("Reading full capture metadata from %s...", self.file)
|
logging.debug("Reading full capture metadata from %s...", self.file)
|
||||||
exif_dict = self._read_exif()
|
exif_dict = self._read_exif()
|
||||||
return self._decode_usercomment(exif_dict)
|
return self._decode_usercomment(exif_dict)
|
||||||
|
|
||||||
|
|
@ -284,7 +284,7 @@ class CaptureObject(object):
|
||||||
|
|
||||||
# Write new data to file EXIF, if supported
|
# Write new data to file EXIF, if supported
|
||||||
if self.format.upper() in EXIF_FORMATS and self.exists:
|
if self.format.upper() in EXIF_FORMATS and self.exists:
|
||||||
logging.info("Writing Exif data to %s", self.file)
|
logging.debug("Writing Exif data to %s", self.file)
|
||||||
|
|
||||||
# Extract current Exif data
|
# Extract current Exif data
|
||||||
exif_dict = self._read_exif()
|
exif_dict = self._read_exif()
|
||||||
|
|
@ -311,7 +311,7 @@ class CaptureObject(object):
|
||||||
|
|
||||||
# Insert exif into file
|
# Insert exif into file
|
||||||
piexif.insert(exif_bytes, self.file)
|
piexif.insert(exif_bytes, self.file)
|
||||||
logging.info("Finished writing Exif data to %s", self.file)
|
logging.debug("Finished writing Exif data to %s", self.file)
|
||||||
|
|
||||||
# PROPERTIES
|
# PROPERTIES
|
||||||
|
|
||||||
|
|
@ -331,7 +331,7 @@ class CaptureObject(object):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
if self.exists: # If data file exists
|
if self.exists: # If data file exists
|
||||||
logging.info("Opening from file %s", (self.file))
|
logging.debug("Opening from file %s", (self.file))
|
||||||
with open(self.file, "rb") as f:
|
with open(self.file, "rb") as f:
|
||||||
d = io.BytesIO(f.read()) # Load bytes from file
|
d = io.BytesIO(f.read()) # Load bytes from file
|
||||||
d.seek(0) # Rewind loaded bytestream
|
d.seek(0) # Rewind loaded bytestream
|
||||||
|
|
|
||||||
|
|
@ -175,13 +175,13 @@ class CaptureManager:
|
||||||
def remove_image(self, capture_obj: CaptureObject, capture_id: str):
|
def remove_image(self, capture_obj: CaptureObject, capture_id: str):
|
||||||
logging.info("Deleting capture %s", capture_id)
|
logging.info("Deleting capture %s", capture_id)
|
||||||
if capture_id in self.images:
|
if capture_id in self.images:
|
||||||
logging.info("Deleting capture object %s", capture_obj)
|
logging.debug("Deleting capture object %s", capture_obj)
|
||||||
del self.images[capture_id]
|
del self.images[capture_id]
|
||||||
|
|
||||||
def remove_video(self, capture_obj: CaptureObject, capture_id: str):
|
def remove_video(self, capture_obj: CaptureObject, capture_id: str):
|
||||||
logging.info("Deleting capture %s", capture_id)
|
logging.info("Deleting capture %s", capture_id)
|
||||||
if capture_id in self.images:
|
if capture_id in self.images:
|
||||||
logging.info("Deleting capture object %s", capture_obj)
|
logging.debug("Deleting capture object %s", capture_obj)
|
||||||
del self.videos[capture_id]
|
del self.videos[capture_id]
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue