Collecting Debug Logs

When reaching out for debugging assistance with the Unified SDK, please collect and provide the following logs:

UnifiedSDK Logs

Logs contain information about the Unified SDK service.

Default location: C:\ProgramData\UnifiedSDK.Service\logs\UnifiedSDK.Service.log

Or you can specify where UnifiedSDK service should store log files by options -lf "<path to the log file>" or -d "<path to the data folder>".

Note, that by default UnifiedSDK service writes only Error logs (Error log level) and it can be not enough for investigation in some error scenarios.

You can configure logging level with -ll option when you are installing UnifiedSDK service.

UnifiedSDK.Service.exe -i "ServiceName" -ll "Debug" -lf "c:\ProgramData\MyApp\logs\service.log"

Also you can use the following method to configure the log level for SDK service on runtime:

await sdk.ConfigureLogLevelAsync(requiredLogLevel).ConfigureAwait(false);

Note, that the -ll option passed during service installation has higher priority comparing to the value updated by this method and will take in place after service restart.

And to get the minimum log level used by SDK service at the moment:

var result = await sdk.GetCurrentLogLevelAsync().ConfigureAwait(false);

Note, that with Trace and Debug levels you will take all requests and responses without any encryption. All keys and token will be logged to the log file. So we recommend to use default option settings (only error logging), Warning or Information (only general data logging) in production.

Protocols Logs

Protocol logs can be enabled via StartVpnRequest using EnableTunnelLogging property.

// This example shows the launch of the Hydra protocol with enabled logs 
var startVpnRequest = new StartVpnRequest
{
    AccessToken = loginResponse.AccessToken,
    Credentials = getCredentialsResponse.Credentials,
    DeviceId = DEVICEID,
    EnableKillSwitch = false,
    EnableTunnelLogging = true,
    VpnNode = getNodesResponse.VpnCountries.FirstOrDefault(),
};
    
var startVpnResponse = sdk.StartVpn(startVpnRequest);

Once enabled, protocol logs will be stored at the following locations:

Protocol
Location

Hydra

C:\ProgramData\UnifiedSDK.Service\system\logs\hydra.log

WireGuard

C:\Program Files (x86)\%your_app_folder%\Executable\Wireguard\log.bin

Windows Event Logs

Some events, such as unexpected service drops, are logged to Windows Event Logs.

To access these logs:

  1. Open Event Viewer by running: %windir%\system32\eventvwr.msc /s

  2. Navigate to Windows Logs > Application

  3. Look for log entries with the source UnifiedSDK.Service

EventViewer logs example

Memory Dumps

More information about memory dumps can be found here.

Last updated

Was this helpful?