Repository navigation
Describe logging in README - #204
Merged
Merged
Conversation
README and README.ja.md describe how to redirect the log messages of the C# code through InstantReplay.ILogger, where the native library writes its log messages, and how to change the native log level from code or from the Preferences window. The doc comment of unienc_set_log_level stated that the default level of release builds is Info. It is Warn.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a section on logging to the README, in English (
README.md) and Japanese (README.ja.md). The logging features had not been described anywhere except in the changelog.The section explains that Instant Replay emits log messages from two independent sources, and describes each of them:
InstantReplay.ILogger.Logger, with an example.UnityEngine.ILogger.unienctag on Android before Unity has loaded the plugin.Warn) and how to change it withUniEnc.NativeLogging.SetLevel.DebugandTracelevels in development builds, where Unity captures a stack trace for each message.This PR also corrects the doc comment of
unienc_set_log_level, which stated that the default level of release builds of the native library isInfo. The default has beenWarnsince the level was changed, andNativeLogging.SetLeveland the Preferences window already said so. The generatedNativeMethods.g.cswas edited by hand to match, which is the same output that csbindgen produces from the corrected comment.The destinations on Web (the browser console) and iOS (the Xcode console) are inferred from the code and have not been confirmed on a device.