Skip to content

Unity

This document provides information you need before you start developing Hive SDK.

Debug log

When developing your app using Hive SDK, you can view debug logs for debugging purposes. To view debug logs, enable Hive > Hive Debug Log in your Unity project. It is disabled by default.

Runtime log

To view Hive SDK logs when your app is running, set useLog to true in the Configuration class.

Setting runtime log type

You can select specific log types to view among the Hive SDK logs. You can set the Hive SDK log type using the Logger.setLogFilter API. You can choose from the following six log types, with LogType.Verbose as the default setting.

  • LogType.Verbose: Development stage output log
  • LogType.Debug: Detailed log for all stages
  • LogType.Info: Hive SDK progress stages and result callbacks (Recommended)
  • LogType.Warning: Errors that occur unexpectedly but do not affect game execution
  • LogType.Error: Errors that occur due to missing configuration information and affect game execution
  • LogType.None: No logs are output

The log type order is as follows, from the highest level to the lowest level, and only levels below the set log type are output:

Verbose > Debug > Info > Waring > Error > None

LogFilter logFilter = new LogFilter();
logFilter.coreLog = hive.LogType.Info;
logFilter.serviceLog = hive.LogType.Info;

hive.Logger.setLogFilter(logFilter);