summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Core/DelegateLogListener.cs
blob: ba0e9d1b214ae445fa1c8d4469acb2eb468e78bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
using System;
using Xamarin.Forms.Internals;

namespace Xamarin.Forms.Internals
{
	public class DelegateLogListener : LogListener
	{
		readonly Action<string, string> _log;

		public DelegateLogListener(Action<string, string> log)
		{
			if (log == null)
				throw new ArgumentNullException("log");

			_log = log;
		}

		public override void Warning(string category, string message)
		{
			_log(category, message);
		}
	}
}