Skip to content

Commit b3ecf04

Browse files
chore: improve activation logging (#1228)
1 parent f287376 commit b3ecf04

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

services/activation.py

+14-2
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,24 @@ def try_auto_activate(org: Owner, owner: Owner) -> bool:
7676
activator = _get_activator(org, owner)
7777

7878
if activator.is_autoactivation_enabled():
79-
log.info(f"Attemping to auto-activate user {owner.ownerid} in {org.ownerid}")
79+
log.info(
80+
"Attemping to auto-activate user",
81+
extra=dict(
82+
owner_id=owner.ownerid,
83+
org_id=org.ownerid
84+
),
85+
)
8086
if activator.can_activate_user():
8187
activator.activate_user()
8288
return True
8389
else:
84-
log.info("Auto-activation failed -- not enough seats remaining")
90+
log.info(
91+
"Auto-activation failed -- not enough seats remaining",
92+
extra=dict(
93+
owner_id=owner.ownerid,
94+
org_id=org.ownerid
95+
),
96+
)
8597
return False
8698

8799

0 commit comments

Comments
 (0)