当我通过 CloudWatch 警报通知为我的 aws lambda 函数创建错误警报并且此警报被触发时,我收到的电子邮件只是指出发生了错误。为了让我看到错误,我需要登录 aws,转到 CloudWatch 的特定日志流并尝试找出错误所在。
我想知道是否有办法设置 CloudWatch 通知以在发送警报通知时包含实际的错误消息。
#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)
问题是,我的代码出了什么问题?为什么柜台不起作用?因为我尝试了很多方法,没有任何作用,也许有人可以为我解释.