2019-09-04 22:29:23 +02:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using Microsoft.Build.Utilities;
|
|
|
|
|
|
2019-09-10 22:48:25 +02:00
|
|
|
|
namespace CapnpC.CSharp.MsBuild.Generation
|
2019-09-04 22:29:23 +02:00
|
|
|
|
{
|
|
|
|
|
public static class LogExtensions
|
|
|
|
|
{
|
|
|
|
|
public static void LogWithNameTag(
|
|
|
|
|
this TaskLoggingHelper loggingHelper,
|
|
|
|
|
Action<string, object[]> loggingMethod,
|
|
|
|
|
string message,
|
|
|
|
|
params object[] messageArgs)
|
|
|
|
|
{
|
2019-09-10 22:48:25 +02:00
|
|
|
|
string fullMessage = $"[Cap'n Proto] {message}";
|
2019-09-04 22:29:23 +02:00
|
|
|
|
loggingMethod?.Invoke(fullMessage, messageArgs);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|