Skip to content

Commit 593ac37

Browse files
committed
log id generation
1 parent 9dfbfa4 commit 593ac37

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

impl/utils.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,9 @@ def read_objects(astradb: CassandraClient, target_class: Type[BaseModel], table_
168168
def generate_id(prefix: str, num_bytes=24):
169169
random_bytes = secrets.token_bytes(num_bytes)
170170
random_string = base64.urlsafe_b64encode(random_bytes).rstrip(b'=').decode('utf-8')
171-
return f"{prefix}_{random_string}"
171+
generated_id = f"{prefix}_{random_string}"
172+
logger.info(f"generated id: {generated_id}")
173+
return generated_id
172174

173175

174176
def generate_id_from_upload_file(upload_file, prefix="file", length=24):

0 commit comments

Comments
 (0)