forked from dotnet/android
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Xamarin.Android.Build.Tasks] Add
RunWithLogging
target (dotnet#8324)
We are frequently faced with the need to look at some detailed information optionally logged by our runtime (as well as by the MonoVM runtime in dotnet/runtime), and in order to obtain the necessary data, we ask our users to perform a series of steps on the command line. This is a task we can easily wrap in a nice target, so that instead of having to type 5 lines of commands the user instead invokes a single command which will do the rest for them: dotnet build -t:RunWithLogging The above command will: 1. Set the `debug.mono.log` Android system property 2. increase the `adb logcat` buffer size 3. clear the `adb logcat` buffer, 4. start the application waiting for it to be fully started 5. pause for 1s 6. dump the `adb logcat` buffer to a file. 7. Print a message mentioning where the `adb logcat` output is. The `$(RunLogVerbose)` MSBuild property can be used to increase verbosity. By default the `RunWithLogging` target will set the `debug.mono.log` system property to: default,assembly,timing=bare When `$(RunLogVerbose)`=true, `debug.mono.log` is instead set to: default,assembly,timing=bare,mono_log_level=debug,mono_log_mask=all The `$(RunLogDelayInMS)` MSBuild property can be used to override the pause in step (5). The `$(_RunLogFilePath)` MSBuild property controls the output filename; by default it is `$(IntermediateOutputPath)logcat.txt`.
- Loading branch information
Showing
7 changed files
with
96 additions
and
10 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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