Source code for milvus.settings
import logging.config
[docs]class DefaultConfig:
GRPC_PORT = "19530"
GRPC_URI = 'tcp://127.0.0.1:19530'
# logging
COLORS = {
'HEADER': '\033[95m',
'INFO': '\033[92m',
'DEBUG': '\033[94m',
'WARNING': '\033[93m',
'ERROR': '\033[95m',
'CRITICAL': '\033[91m',
'ENDC': '\033[0m',
}
LOG_LEVEL = 'WARNING'
LOGGING = {
'version': 1,
'disable_existing_loggers': True,
'handlers': {
'console': {
'class': 'logging.StreamHandler',
},
},
'loggers': {
'milvus': {
'handlers': ['console'],
'level': LOG_LEVEL,
},
},
}
if LOG_LEVEL == 'DEBUG':
LOGGING['formatters'] = {
'colorful_console': {
'format': '[%(asctime)s-%(levelname)s-%(name)s]: %(message)s (%(filename)s:%(lineno)s)',
'()': ColorfulFormatter,
},
}
LOGGING['handlers']['milvus_console'] = {
'class': 'logging.StreamHandler',
'formatter': 'colorful_console',
}
LOGGING['loggers']['milvus'] = {
'handlers': ['milvus_console'],
'level': LOG_LEVEL,
}
logging.config.dictConfig(LOGGING)