Reduce log output for Pint library (#10803)
- Reduce clutter in app startup due to unit redefinition
This commit is contained in:
parent
682dd79326
commit
246c084e6e
|
|
@ -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."""
|
||||
|
|
|
|||
Loading…
Reference in New Issue