简体   繁体   中英

how to get familiar with logs in aws

I'm new using awsglue.

I want to create logs on the cloudwatch. What can I do to go faster and see my log?

logger = glueContext.get_logger()
logger.info("Resultcount" + str(df.select(F.countDistinct(df.struct1.field1)).collect()[0][0])

You don't have to do anything. By default AWS Glue creates log in the Cloudwatch. Once you run the job, click on the logs against your job in the jobs history, and you can check for your print statement in the Cloudwatch. Please refer here for a sample cloudwatch log of dataframe.show()

默认情况下,打印语句会出现在 cloudwatch 的错误日志中。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM