Browse Source

chore(magic_pdf): enhance license logging information

- Add license ID information to the log for better traceability
- Improve logging format to include both license ID and expiration date
myhloli 8 months ago
parent
commit
3fe315d841
1 changed files with 2 additions and 1 deletions
  1. 2 1
      magic_pdf/model/sub_modules/model_init.py

+ 2 - 1
magic_pdf/model/sub_modules/model_init.py

@@ -14,7 +14,8 @@ try:
     from magic_pdf_ascend_plugin.model_plugin.ocr.paddleocr.ppocr_273_npu import ModifiedPaddleOCR
     from magic_pdf_ascend_plugin.model_plugin.table.rapidtable.rapid_table_npu import RapidTableModel
     license_key = load_license()
-    logger.info(f'Using Ascend Plugin Success, License expired at {license_key["payload"]["date"]["end_date"]}')
+    logger.info(f'Using Ascend Plugin Success, License id is {license_key["payload"]["id"]},'
+                f' License expired at {license_key["payload"]["date"]["end_date"]}')
 except Exception as e:
     if isinstance(e, ImportError):
         pass