mirror of
https://github.com/inventree/InvenTree.git
synced 2026-10-05 09:55:28 +00:00
Reduce log output for Pint library (#10803)
- Reduce clutter in app startup due to unit redefinition
This commit is contained in:
1 parent
682dd79326
commit
246c084e6e
1 file changed
+4
@@ -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."""
|
||||
|
||||
Reference in new issue
Block a user