小编Joh*_*ter的帖子

提供来自 aws CloudWatch 警报的错误消息

当我通过 CloudWatch 警报通知为我的 aws lambda 函数创建错误警报并且此警报被触发时,我收到的电子邮件只是指出发生了错误。为了让我看到错误,我需要登录 aws,转到 CloudWatch 的特定日志流并尝试找出错误所在。

我想知道是否有办法设置 CloudWatch 通知以在发送警报通知时包含实际的错误消息。

amazon-web-services amazon-cloudwatch aws-lambda

4
推荐指数
1
解决办法
1801
查看次数

我试图找到C中我的字符串中有多少个元音和辅音

 #include <stdio.h>
 #include <string.h>

 int main()
 {
   int i;
   int counter=0, counter2=0;
   char *s;
   char name[30];
   char vowel[6] = "AEIOU";
   char consonants[21] = "BCDFGHJKLMNPQRSTVWXYZ";

   printf ("input the string: ");
   scanf  ("%s", name);
   printf ("The string is %s\n", name);
   for (i=0; name[i]!='\0'; i++) {
     if (s = strchr(vowel, name[i])) {
       counter++;
     }
     else if (s =strchr(consonants, name[i])) {
       counter2++;
     }
     printf ("First counter is %d\n", counter);
     printf ("The second counter is %d\n", counter2);
     return 0;
   }
 }
Run Code Online (Sandbox Code Playgroud)

问题是,我的代码出了什么问题?为什么柜台不起作用?因为我尝试了很多方法,没有任何作用,也许有人可以为我解释.

c arrays string

-2
推荐指数
1
解决办法
2722
查看次数