summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Core/Log.cs
blob: b8053e5dc1442943ae10996f35625e6aadf7c562 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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));
		}
	}
}