summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Core/Log.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Xamarin.Forms.Core/Log.cs')
-rw-r--r--Xamarin.Forms.Core/Log.cs25
1 files changed, 25 insertions, 0 deletions
diff --git a/Xamarin.Forms.Core/Log.cs b/Xamarin.Forms.Core/Log.cs
new file mode 100644
index 00000000..b8053e5d
--- /dev/null
+++ b/Xamarin.Forms.Core/Log.cs
@@ -0,0 +1,25 @@
+using System.Collections.Generic;
+
+namespace Xamarin.Forms
+{
+ internal static class Log
+ {
+ static Log()
+ {
+ Listeners = new SynchronizedList<LogListener>();
+ }
+
+ public static IList<LogListener> Listeners { get; }
+
+ public static void Warning(string category, string message)
+ {
+ foreach (LogListener listener in Listeners)
+ listener.Warning(category, message);
+ }
+
+ public static void Warning(string category, string format, params object[] args)
+ {
+ Warning(category, string.Format(format, args));
+ }
+ }
+} \ No newline at end of file