2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-11-13 11:26:42 +00:00

Reduce log output for Pint library (#10803)

- Reduce clutter in app startup due to unit redefinition
This commit is contained in:
Oliver
2025-11-11 13:33:43 +11:00
committed by GitHub
parent 682dd79326
commit 246c084e6e

View File

@@ -1,5 +1,6 @@
"""Helper functions for converting between units."""
import logging
import re
from typing import Optional
@@ -14,6 +15,9 @@ import structlog
logger = structlog.get_logger('inventree')
# Disable log output for Pint library
logging.getLogger('pint').setLevel(logging.ERROR)
def get_unit_registry():
"""Return a custom instance of the Pint UnitRegistry."""