ISteamNetworkingUtils.SetDebugOutputFunction

Set a function to receive network-related information that is useful for debugging. This can be very useful during development, but it can also be useful for troubleshooting problems with tech savvy end users. If you have a console or other log that customers can examine, these log messages can often be helpful to troubleshoot network issues. (Especially any warning/error messages.)

The detail level indicates what message to invoke your callback on. Lower numeric value means more important, and the value you pass is the lowest priority (highest numeric value) you wish to receive callbacks for.

The value here controls the detail level for most messages. You can control the detail level for various subsystems (perhaps only for certain connections) by adjusting the configuration values k_ESteamNetworkingConfig_LogLevel_Xxxxx.

Except when debugging, you should only use k_ESteamNetworkingSocketsDebugOutputType_Msg or k_ESteamNetworkingSocketsDebugOutputType_Warning. For best performance, do NOT request a high detail level and then filter out messages in your callback. This incurs all of the expense of formatting the messages, which are then discarded. Setting a high priority value (low numeric value) here allows the library to avoid doing this work.

IMPORTANT: This may be called from a service thread, while we own a mutex, etc. Your output function must be threadsafe and fast! Do not make any other Steamworks calls from within the handler.

Meta