Using the built-in logger is convenient because it's auto-configured:
|
def configure_logger(settings: Settings = None): |
However, it falls short when trying to debug messages coming from multiple different models - all of these will be assigned the
mlserver name so it's difficult to tell which message came from which component.. A workaround is to roll your own logging in each component, but this adds boilerplate for each of the components that require logging (unless the custom logging configuration is split out into some utility library, but then that brings in other complications).
Using the built-in logger is convenient because it's auto-configured:
MLServer/mlserver/logging.py
Line 23 in 7437787
However, it falls short when trying to debug messages coming from multiple different models - all of these will be assigned the
mlservername so it's difficult to tell which message came from which component.. A workaround is to roll your own logging in each component, but this adds boilerplate for each of the components that require logging (unless the custom logging configuration is split out into some utility library, but then that brings in other complications).