0

From Sagemaker

log file is read like follows:

sess = boto3.Session(region_name)
s3client = sess.client("S3")
log_obj = s3client.get_object(Bucket=bucket_name, Key=log_file_path)
log_obj["Body"].read()

which looks like this:

b'hello world this is log file1 \n arguments passed to function are \n [a,b,c,d] \n and so on...'

It is in one large text, unlike logs I see from other SO questions...

If \n writes next string into new line it would be much more easy to read, is there a way to let python NOT ignore escape character?

Or if there is better way to parse log of text from S3, let me know.

John Rotenstein
  • 241,921
  • 22
  • 380
  • 470
haneulkim
  • 4,406
  • 9
  • 38
  • 80

0 Answers0