Amazon CloudWatch 로그에서 텍스트 로그 보기 - Amazon Lex V1

지원 종료 공지: 2025년 9월 15 AWS 일에는 Amazon Lex V1에 대한 지원을 중단합니다. 2025년 9월 15일 이후에는 Amazon Lex V1 콘솔 또는 Amazon Lex V1 리소스에 더 이상 액세스할 수 없습니다. Amazon Lex V2를 사용하는 경우 대신 Amazon Lex V2 가이드를 참조하세요.

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

Amazon CloudWatch 로그에서 텍스트 로그 보기

Amazon Lex는 Amazon CloudWatch Logs 의 사용자 대화에 대한 텍스트 로그를 저장합니다. 로그를 보려면 CloudWatch Logs 콘솔이나 API를 사용하십시오. 자세한 내용은 필터 패턴을 사용한 로그 데이터 검색Amazon CloudWatch Logs 사용자 가이드CloudWatch Logs Insights 쿼리 구문을 참조하세요.

Amazon Lex 콘솔을 사용하여 로그를 보려면
  1. https://console.aws.amazon.com/lex에서 Amazon Lex 콘솔을 엽니다.

  2. 목록에서 봇을 선택합니다.

  3. 설정 탭을 선택한 다음 왼쪽 메뉴에서 대화 로그를 선택합니다.

  4. 텍스트 로그 아래의 링크를 선택하여 CloudWatch 콘솔에 있는 별칭에 대한 로그를 봅니다.

CloudWatch 콘솔이나 API를 사용하여 로그 항목을 볼 수도 있습니다. 로그 항목을 찾으려면 별칭에 대해 구성한 로그 그룹으로 이동합니다. Amazon Lex 콘솔 또는 GetBotAlias 작업을 사용하여 로그의 로그 스트림 접두사를 찾습니다.

사용자 표현에 대한 로그 항목은 여러 로그 스트림 에 있습니다. 대화의 표현에는 지정된 접두사가 있는 로그 스트림 중 하나의 항목이 있습니다. 로그 스트림 의 항목에는 다음 정보가 있습니다.

{ "messageVersion": "1.0", "botName": "bot name", "botAlias": "bot alias", "botVersion": "bot version", "inputTranscript": "text used to process the request", "botResponse": "response from the bot", "intent": "matched intent", "nluIntentConfidence": "number", "slots": { "slot name": "slot value", "slot name": null, "slot name": "slot value" ... }, "alternativeIntents": [ { "name": "intent name", "nluIntentConfidence": "number", "slots": { "slot name": slot value, "slot name": null, "slot name": slot value ... } }, { "name": "intent name", "nluIntentConfidence": number, "slots": {} } ], "developerOverride": "true" | "false", "missedUtterance": true | false, "inputDialogMode": "Text" | "Speech", "requestId": "request ID", "s3PathForAudio": "S3 path to audio file", "userId": "user ID", "sessionId": "session ID", "sentimentResponse": { "sentimentScore": "{Positive: number, Negative: number, Neutral: number, Mixed: number}", "sentimentLabel": "Positive" | "Negative" | "Neutral" | "Mixed" }, "slotToElicit": "slot name", "dialogState": "ElicitIntent" | "ConfirmIntent" | "ElicitSlot" | "Fulfilled" | "ReadyForFulfillment" | "Failed", "responseCard": { "genericAttachments": [ ... ], "contentType": "application/vnd.amazonaws.card.generic", "version": 1 }, "locale": "locale", "timestamp": "ISO 8601 UTC timestamp", "kendraResponse": { "totalNumberOfResults": number, "resultItems": [ { "id": "query ID", "type": "DOCUMENT" | "QUESTION_ANSWER" | "ANSWER", "additionalAttributes": [ { ... } ], "documentId": "document ID", "documentTitle": { "text": "title", "highlights": null }, "documentExcerpt": { "text": "text", "highlights": [ { "beginOffset": number, "endOffset": number, "topAnswer": true | false } ] }, "documentURI": "URI", "documentAttributes": [] } ], "facetResults": [], "sdkResponseMetadata": { "requestId": "request ID" }, "sdkHttpMetadata": { "httpHeaders": { "Content-Length": "number", "Content-Type": "application/x-amz-json-1.1", "Date": "date and time", "x-amzn-RequestId": "request ID" }, "httpStatusCode": 200 }, "queryId": "query ID" }, "sessionAttributes": { "attribute name": "attribute value" ... }, "requestAttributes": { "attribute name": "attribute value" ... } }

로그 항목의 내용은 거래 결과와 봇 및 요청 구성에 따라 다릅니다.

  • intent, slots, slotToElicit 필드는 missedUtterance 필드가 true인 경우 항목에 나타나지 않습니다.

  • 오디오 로그가 비활성화되어 있거나 inputDialogMode 필드가 Text인 경우 s3PathForAudio 필드가 나타나지 않습니다.

  • responseCard 필드는 봇에 대한 응답 카드를 지정한 경우에만 나타납니다.

  • requestAttributes 맵은 요청에 지정된 속성이 있는 경우에만 나타납니다.

  • kendraResponse필드는 AMAZON.KendraSearchIntent가 Amazon Kendra 인덱스 검색을 요청할 때만 표시됩니다.

  • 봇의 Lambda 함수에 대체 의도가 지정된 경우 이 developerOverride 필드는 참입니다.

  • sessionAttributes 맵은 요청에 지정된 세션 속성이 있는 경우에만 나타납니다.

  • sentimentResponse 맵은 사용자가 봇을 구성해 감정 값을 반환할 경우에만 나타납니다.

참고

messageVersion에서 해당 내용을 변경하지 않아도 입력 형식을 변경할 수 있습니다. 새 필드가 있는 경우 코드에서 오류가 발생하면 안 됩니다.

Amazon Lex가 CloudWatch 로그에 쓸 수 있도록 설정된 역할과 정책이 있어야 합니다. 자세한 내용은 대화 로그에 대한 IAM 정책을 참조하세요.