简体   繁体   English

如何熟悉aws中的日志

[英]how to get familiar with logs in aws

I'm new using awsglue.我是使用 awsglue 的新手。

I want to create logs on the cloudwatch.我想在 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.默认情况下,AWS Glue 在 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.运行作业后,单击作业历史记录中针对您的作业的日志,您可以在 Cloudwatch 中检查您的打印语句。 Please refer here for a sample cloudwatch log of dataframe.show() 请参阅此处获取 dataframe.show() 的示例 cloudwatch 日志

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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