로그 레벨 설정

Adjust SDK는 다양한 양의 정보를 반환하기 위해 구성 가능한 로그 레벨을 제공합니다. 이용 가능한 로그 레벨은 다음과 같습니다.

logLevel설명
AdjustLogLevel.Verbose풀 로깅 활성화
AdjustLogLevel.Debug디버그 문제를 위해 더욱 상세한 로깅 활성화
AdjustLogLevel.Info정보, 경고, 오류, assert 로그 반환
AdjustLogLevel.Warn경고, 오류, assert 로그 반환
AdjustLogLevel.Error오류와 assert 로그만 반환
AdjustLogLevel.Assertassert 로그만 반환
AdjustLogLevel.Suppress모든 로깅 비활성화.

로그 레벨은 Adjust prefab 메뉴에서 설정하거나, config 인스턴스에서 setLogLevel 메서드를 호출하여 설정할 수 있습니다.

C#
AdjustConfig config = new AdjustConfig("{YourAppToken}", AdjustEnvironment.Sandbox, true);
config.setLogLevel(AdjustLogLevel.Error);
Adjust.start(config);

모든 로깅 비활성화

SDK를 수동으로 초기화할 때 모든 로그 출력을 비활성화하려면 config 인스턴스에서 setLogLevel(AdjustLogLevel.Suppress) 메서드를 호출하시기 바랍니다. allowSuppressLogLevel를 설정하기 위해 true 값을 AdjustConfig 선언의 3번째 인수로써 전달해야 합니다.

C#
AdjustConfig adjustConfig = new AdjustConfig("{YourAppToken}", AdjustEnvironment.Sandbox, true);
//...
adjustConfig.setLogLevel(AdjustLogLevel.Suppress);
//...
Adjust.start(adjustConfig);

Windows에서 컴파일된 로그 확인

타겟이 Windows 기반인 경우 Adjust 라이브러리에서 컴파일된 로그를 Production 모드로 확인하려면 Sandbox 모드에서 앱을 테스트하면서 로그 출력을 앱으로 리다이렉트합니다.

로그 델리게이트를 등록하려면 setLogDelegate 메서드를 AdjustConfig 인스턴스에서 호출하시기 바랍니다.

중요:
setLogDelegate 메서드는 반드시 Adjust SDK 초기화 이전에 호출되어야 합니다.
C#
AdjustConfig adjustConfig = new AdjustConfig("{YourAppToken}", AdjustEnvironment.Sandbox, true);
//...
adjustConfig.setLogDelegate(msg => Debug.Log(msg));
//...
Adjust.start(adjustConfig);