JavaScript 어댑터의 로깅

improve this page | report issue

개요

이 학습서는 로깅 기능을 JavaScript 어댑터에 추가하기 위해 필요한 코드 스니펫을 제공합니다.

로깅 예제

아래 메시지는 애플리케이션 서버의 trace.log 파일에 출력됩니다. 서버 관리자가 로그를 MobileFirst Server에서 MobileFirst Analytics Server로 전달 중인 경우 logger 메시지가 MobileFirst Analytics Console의 인프라스트럭처 → 서버 로그 검색 보기에도 표시됩니다.

MFP.Logger.debug("This is a debug message from a JavaScript adapter");

최소에서 최대 상세까지 추가 로깅 레벨로 ERROR, WARN, INFO, 및 DEBUG가 있습니다.

로그 파일에 액세스

Analytics 서버로 로그 전달

로그는 또한 Analytics 콘솔에 전달될 수 있습니다.

  1. MobileFirst Operations Console의 사이드바 탐색에서 설정 옵션을 선택하십시오.
  2. 런타임 특성 탭에 있는 편집 단추를 클릭하십시오.
  3. Analytics → 추가 패키지 섹션에서 JavaScript 어댑터 로그를 MobileFirst Server로 전달하려면 MFP.Logger를 지정하십시오.

콘솔에서 로그 필터링

Inclusive terminology note: The Mobile First Platform team is making changes to support the IBM® initiative to replace racially biased and other discriminatory language in our code and content with more inclusive language. While IBM values the use of inclusive language, terms that are outside of IBM's direct influence are sometimes required for the sake of maintaining user understanding. As other industry leaders join IBM in embracing the use of inclusive language, IBM will continue to update the documentation to reflect those changes.
Last modified on July 12, 2019