Open alext234 opened 4 years ago
Hi @alext234 , the MMS documentation does not seem to mention that model server logs can be converted to JSON format. what is the log contents that you wish to see but we did not output?
Also, if you want to use a different log level, you could use SAGEMAKER_CONTAINER_LOG
env var to adjust that.
Hi @ChuyangDeng
JSON format would be convenient for centralised logging system to easily index and search. We can also add custom kv fields to the logs. One use-case is we add a json formatter to the standard Python logging
module any log from our code are in JSOn format, for example
logger.info("inference completed", extra={"result": result})
I've started looking at
start_model_server()
and this documentation on logging at https://github.com/awslabs/multi-model-server/blob/master/docs/logging.mdbut still not sure how we go about changing it to output JSON format, with extra custom fields.
Is there any guide on this part?