Skip to content

Commit c112af9

Browse files
committed
logging.info needs backport
1 parent 3f1d63d commit c112af9

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

src/allocation/adapters/orm.py

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import logging
12
from sqlalchemy import (
23
Table,
34
MetaData,
@@ -12,6 +13,7 @@
1213

1314
from allocation.domain import model
1415

16+
logger = logging.getLogger(__name__)
1517

1618
metadata = MetaData()
1719

@@ -59,6 +61,7 @@
5961

6062

6163
def start_mappers():
64+
logger.info("Starting mappers")
6265
lines_mapper = mapper(model.OrderLine, order_lines)
6366
batches_mapper = mapper(
6467
model.Batch,

src/allocation/adapters/redis_eventpublisher.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@
1212

1313

1414
def publish(channel, event: events.Event):
15-
logging.debug("publishing: channel=%s, event=%s", channel, event)
15+
logging.info("publishing: channel=%s, event=%s", channel, event)
1616
r.publish(channel, json.dumps(asdict(event)))

src/allocation/entrypoints/redis_eventconsumer.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212

1313
def main():
14+
logger.info("Redis pubsub starting")
1415
bus = bootstrap.bootstrap()
1516
pubsub = r.pubsub(ignore_subscribe_messages=True)
1617
pubsub.subscribe("change_batch_quantity")
@@ -20,7 +21,7 @@ def main():
2021

2122

2223
def handle_change_batch_quantity(m, bus):
23-
logging.debug("handling %s", m)
24+
logger.info("handling %s", m)
2425
data = json.loads(m["data"])
2526
cmd = commands.ChangeBatchQuantity(ref=data["batchref"], qty=data["qty"])
2627
bus.handle(cmd)

0 commit comments

Comments
 (0)