예제 #1
0
        public BinaryLoggerForwarderProvider(string outputFilePath)
        {
            _source = new BinaryLoggerEventSource();

            _msbuildLogger = new Microsoft.Build.Logging.BinaryLogger()
            {
                Verbosity             = Microsoft.Build.Framework.LoggerVerbosity.Diagnostic,
                CollectProjectImports = Microsoft.Build.Logging.BinaryLogger.ProjectImportsCollectionMode.None,
                Parameters            = $"logfile={outputFilePath}"
            };

            _msbuildLogger.Initialize(_source);
            _source.RaiseBuildStart();

            LogExtensionPoint.AmbientLoggerFactory.AddProvider(this);
        }
 public BinaryLoggerForwarder(string categoryName, BinaryLoggerEventSource eventSource)
 {
     _eventSource  = eventSource;
     _categoryName = categoryName;
 }