Set log level

The Adjust SDK provides configurable log levels to return different amounts of information. The following log levels are available:

Log levelDescription
AdjustLogLevel.VerboseEnable full logging.
AdjustLogLevel.DebugEnable more detailed logging for debugging issues.
AdjustLogLevel.InfoReturn info, warnings, errors, and assert logs.
AdjustLogLevel.WarnReturn warnings, errors, and assert logs.
AdjustLogLevel.ErrorReturn only errors and assert logs.
AdjustLogLevel.AssertReturn only assert logs.
AdjustLogLevel.SuppressDisable all logging.

You can set your log level in the Adjust prefab menu or by calling the setLogLevel method on your config instance.

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

Disable all logging

To disable all log output when initializing the SDK manually, call setLogLevel(AdjustLogLevel.Suppress) on your config instance. You need to set allowSuppressLogLevel by passing a true value as the third argument in your AdjustConfig declaration.

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

View compiled logs on Windows

If your target is Windows-based and you want to see the compiled logs from our library in Production mode, redirect the log output to your app while testing it in Sandbox mode.

To register a log delegate, call the setLogDelegate method on your AdjustConfig instance.

Important:
You must call the setLogDelegate method before you initialize the Adjust SDK.
C#
AdjustConfig adjustConfig = new AdjustConfig("{YourAppToken}", AdjustEnvironment.Sandbox, true);
//...
adjustConfig.setLogDelegate(msg => Debug.Log(msg));
//...
Adjust.start(adjustConfig);