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가 있습니다.
로그 파일에 액세스
- MobileFirst Server의 사내 구축형 설치에서 파일은 기반이 되는 애플리케이션 서버에 따라 사용 가능합니다.
- 다음에서 클라우드 배치의 로그를 얻을 수 있습니다.
- IBM Containers 또는 Liberty 빌드 팩, IBM Containers 로그 및 추적 콜렉션 학습서를 참조하십시오.
- Mobile Foundation IBM Cloud 서비스, Mobile Foundation 사용 학습서에서 서버 로그에 액세스 절을 참조하십시오.
Analytics 서버로 로그 전달
로그는 또한 Analytics 콘솔에 전달될 수 있습니다.
- MobileFirst Operations Console의 사이드바 탐색에서 설정 옵션을 선택하십시오.
- 런타임 특성 탭에 있는 편집 단추를 클릭하십시오.
- 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