Fix trace logging on Android
authorMarek Habersack <grendel@twistedcode.net>
Tue, 27 Sep 2016 18:31:19 +0000 (20:31 +0200)
committerMarek Habersack <grendel@twistedcode.net>
Tue, 27 Sep 2016 18:31:19 +0000 (20:31 +0200)
commit79b828c66d78a2697e317d279dc14b7c7646bceb
treee9da0f54c3e41d117913167929ba18cadc592e95
parente6536dd5e118a16cdca12840d6529ef9d01aaaad
Fix trace logging on Android

Introduction of the structured trace logger accidentally broke Android
logcat logging. The reason for this is that the default logging handler
defined in eglib (in goutput.c) for Android was never called, instead it
was superseeded by the log file logger defined in mono-logger.c

The net effect was that Mono tried to write the messages to some file on
Android leaving logcat devoid of any trace of life :)

This commit fixes the issue by introducing a set of structured logging
functions for Android.

As a side note - file logging on Android is not that useful. Writing to
a file on external storage medium requires app permissions and writing
to a location on internal storage medium, while allowed, might be
subject to space limitations and should not be used for possibly
voluminous data. It's therefore not very practical on Android.
mono/utils/Makefile.am
mono/utils/mono-log-android.c [new file with mode: 0644]
mono/utils/mono-logger-internals.h
mono/utils/mono-logger.c