Skip to content

Commit

Permalink
One more logging update
Browse files Browse the repository at this point in the history
  • Loading branch information
iwatkot authored Dec 13, 2024
1 parent 5065e85 commit 7890510
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions maps4fs/generator/background.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ def plane_from_np(self, tile_code: str, dem_data: np.ndarray, save_path: str) ->
mesh.apply_transform(rotation_matrix_y)
mesh.apply_transform(rotation_matrix_z)

self.logger.info("Mesh generated with %s faces, will be simplified", len(mesh.faces))
self.logger.debug("Mesh generated with %s faces, will be simplified", len(mesh.faces))

# Simplify the mesh to reduce the number of faces.
mesh = mesh.simplify_quadric_decimation(face_count=len(faces) // simplify_factor)
Expand All @@ -223,7 +223,7 @@ def plane_from_np(self, tile_code: str, dem_data: np.ndarray, save_path: str) ->
self.mesh_to_stl(mesh)

mesh.export(save_path)
self.logger.info("Obj file saved: %s", save_path)
self.logger.debug("Obj file saved: %s", save_path)

def mesh_to_stl(self, mesh: trimesh.Trimesh) -> None:
"""Converts the mesh to an STL file and saves it in the previews directory.
Expand Down
1 change: 0 additions & 1 deletion maps4fs/generator/grle.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ def process(self) -> None:

# Create the InfoLayer PNG file with zeros.
info_layer_data = np.zeros((height, width), dtype=data_type)
print(info_layer_data.shape)
cv2.imwrite(file_path, info_layer_data) # pylint: disable=no-member
self.logger.debug("InfoLayer PNG file %s created.", file_path)
else:
Expand Down
6 changes: 3 additions & 3 deletions webui/queuing.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

from maps4fs import Logger

logger = Logger(level="DEBUG", to_file=False)
logger = Logger(level="INFO", to_file=False)


def get_queue(force: bool = False) -> list[str]:
Expand Down Expand Up @@ -49,7 +49,7 @@ def add_to_queue(session: str) -> None:
queue = get_queue()
queue.append(session)
save_queue(queue)
logger.debug("Session %s added to the queue.", session)
logger.info("Session %s added to the queue.", session)


def get_first_item() -> str | None:
Expand Down Expand Up @@ -89,7 +89,7 @@ def remove_from_queue(session: str) -> None:
if session in queue:
queue.remove(session)
save_queue(queue)
logger.debug("Session %s removed from the queue.", session)
logger.info("Session %s removed from the queue.", session)
else:
logger.debug("Session %s not found in the queue.", session)

Expand Down

0 comments on commit 7890510

Please sign in to comment.