Skip to content
This repository was archived by the owner on Mar 23, 2025. It is now read-only.

Commit 7e8f89b

Browse files
committed
convert debug print statements to use logger
1 parent f69a9fd commit 7e8f89b

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

labelprinterkit/label.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,14 @@
33
provided for you.
44
"""
55
from typing import Tuple
6+
import logging
67

78
from PIL import Image
89

910

11+
logger = logging.getLogger(__name__)
12+
13+
1014
def _coord_add(tup1, tup2):
1115
"""add two tuples of size two"""
1216
return (tup1[0] + tup2[0], tup1[1] + tup2[1])
@@ -73,10 +77,10 @@ def render(self, width=None, height=None) -> Image:
7377
pos[1] += max(i.size[1] for i in line)
7478

7579
xdim, ydim = img.size
76-
print("presize", xdim, ydim, height)
80+
logger.debug("presize %d %d %d", xdim, ydim, height)
7781
xdim = round((height / ydim) * xdim)
7882

79-
print("calcsize", xdim, ydim)
83+
logger.debug("calcsize %d %d", xdim, ydim)
8084
img = img.resize((xdim, height))
8185

8286
return img
@@ -108,10 +112,10 @@ def render(self, width=None, height=None) -> Image:
108112
pos[1] += max(i.size[1] for i in line)
109113

110114
xdim, ydim = img.size
111-
print("presize", xdim, ydim, height)
115+
logger.debug("presize %d %d %d", xdim, ydim, height)
112116
xdim = round((height / ydim) * xdim)
113117

114-
print("calcsize", xdim, ydim)
118+
logger.debug("calcsize %d %d", xdim, ydim)
115119
img = img.resize((xdim, height))
116120

117121
return img

0 commit comments

Comments
 (0)