Merge branch 'less-verbose-captures' into 'master'
Bump some logging statements to DEBUG See merge request openflexure/openflexure-microscope-server!151
This commit is contained in:
commit
ff1ee54ca7
2 changed files with 9 additions and 9 deletions
|
|
@ -111,13 +111,13 @@ class CaptureObject(object):
|
|||
self.stream.write(s)
|
||||
|
||||
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:
|
||||
outfile.write(self.stream.getbuffer())
|
||||
self.stream.close()
|
||||
logging.info("Writing metadata to disk %s", self.file)
|
||||
logging.debug("Writing metadata to disk %s", self.file)
|
||||
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):
|
||||
return open(self.file, mode)
|
||||
|
|
@ -179,7 +179,7 @@ class CaptureObject(object):
|
|||
self.annotations = image_metadata.get("annotations")
|
||||
|
||||
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()
|
||||
return self._decode_usercomment(exif_dict)
|
||||
|
||||
|
|
@ -284,7 +284,7 @@ class CaptureObject(object):
|
|||
|
||||
# Write new data to file EXIF, if supported
|
||||
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
|
||||
exif_dict = self._read_exif()
|
||||
|
|
@ -311,7 +311,7 @@ class CaptureObject(object):
|
|||
|
||||
# Insert exif into 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
|
||||
|
||||
|
|
@ -331,7 +331,7 @@ class CaptureObject(object):
|
|||
"""
|
||||
|
||||
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:
|
||||
d = io.BytesIO(f.read()) # Load bytes from file
|
||||
d.seek(0) # Rewind loaded bytestream
|
||||
|
|
|
|||
|
|
@ -175,13 +175,13 @@ class CaptureManager:
|
|||
def remove_image(self, capture_obj: CaptureObject, capture_id: str):
|
||||
logging.info("Deleting capture %s", capture_id)
|
||||
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]
|
||||
|
||||
def remove_video(self, capture_obj: CaptureObject, capture_id: str):
|
||||
logging.info("Deleting capture %s", capture_id)
|
||||
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]
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue