summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Core/Log.cs
blob: 2e1c318c97b349dd5556fdc5936c74f874067591 (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.Internals
{
	public 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));
		}
	}
}