Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
Created attachment 3448 [details]
Small monotouch app that should show mono runtime logging output
In the attachend project I set the EnvironmentVariables in the project settings MONO_LOG_MASK = all and MONO_LOG_LEVEL = debug. I get no log output from the runtime. On another project (our main development project) I have done the same thing and seen some output but it stops at some point and never resumes even if I do a GC.Collect() which I know should cause some output.
It looks like it's just because stdout is line-cached.
Can you try adding the following to your project(s) to see if you get the expected output: https://gist.github.com/rolfbjarne/239904adb0c4a8f71e92 - remember to add a call to StartFlushing from somewhere in your code.
Yes that works. I can see log messages for GC on simulator and device.
We now log to stderr (which is line buffered, and shows up immediately) instead of stdout in Xamarin.iOS.
The next release should have this fix, in the meantime you can use the workaround from comment 1.
For the record, this is the fix: 2158f572082e3595b2146fd6c7be751188c3b8d5 (mono master).