1 interface inheriting from ILogger
Microsoft.Build.Framework (1)
INodeLogger.cs (1)
20public interface INodeLogger : ILogger
11 implementations of ILogger
dotnet-aot (1)
parent\dotnet\LoggerUtility.cs (1)
238internal class FacadeLogger(PersistentDispatcher dispatcher) : ILogger
Microsoft.Build (5)
BackEnd\BuildManager\BuildManager.cs (1)
3846internal class NullLogger : ILogger
BuildCheck\Infrastructure\BuildCheckConnectorLogger.cs (1)
16internal sealed class BuildCheckConnectorLogger : ILogger
Logging\BinaryLogger\BinaryLogger.cs (1)
57public sealed class BinaryLogger : ILogger, IFileOutputLogger
Logging\ProfilerLogger.cs (1)
23public sealed class ProfilerLogger : ILogger
TelemetryInfra\InternalTelemetryConsumingLogger.cs (1)
11internal sealed class InternalTelemetryConsumingLogger : ILogger
Microsoft.Build.Utilities.Core (1)
Logger.cs (1)
15public abstract class Logger : ILogger
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (1)
MSBuild\Logging\MSBuildDiagnosticLogger.cs (1)
12internal sealed class MSBuildDiagnosticLogger : MSB.Framework.ILogger
Microsoft.DotNet.ArcadeLogging (1)
PipelinesLogger.cs (1)
16public sealed class PipelinesLogger : ILogger
Microsoft.NET.ProjectData.Tasks (1)
ProjectDataBuildCompletionLogger.cs (1)
16public sealed class ProjectDataBuildCompletionLogger : ILogger
NuGet.Build.Tasks.Console (1)
ConsoleLoggingQueue.cs (1)
28internal class ConsoleLoggingQueue : LoggingQueue<ConsoleOutLogItem>, IBuildEngine, ILogger
159 references to ILogger
dotnet-format (1)
Workspaces\MSBuildWorkspaceLoader.cs (1)
40Build.Framework.ILogger? binlog = null;
Microsoft.Build (97)
BackEnd\BuildManager\BuildManager.cs (5)
865IEnumerable<ILogger> AppendDebuggingLoggers(IEnumerable<ILogger> loggers) 3436IEnumerable<ILogger>? loggers, 3479ILogger buildCheckLogger = 3515foreach (ILogger logger in loggers)
BackEnd\BuildManager\BuildParameters.cs (4)
153private IEnumerable<ILogger> _loggers; 302_loggers = other._loggers != null ? new List<ILogger>(other._loggers) : null; 545public IEnumerable<ILogger> Loggers 553foreach (ILogger logger in value)
BackEnd\Components\Logging\ForwardingLoggerRecord.cs (2)
19public ForwardingLoggerRecord(ILogger centralLogger, LoggerDescription forwardingLoggerDescription) 31public ILogger CentralLogger
BackEnd\Components\Logging\ILoggingService.cs (3)
112ICollection<ILogger> Loggers 340bool RegisterDistributedLogger(ILogger centralLogger, LoggerDescription forwardingLogger); 347bool RegisterLogger(ILogger logger);
BackEnd\Components\Logging\LoggingService.cs (20)
136private List<ILogger> _loggers; 141private List<ILogger> _distributedCentralLoggers; 319_loggers = new List<ILogger>(); 320_distributedCentralLoggers = new List<ILogger>(); 515public ICollection<ILogger> Loggers => _loggers; 818foreach (ILogger logger in _loggers) 945foreach (ILogger logger in _loggers) 971foreach (ILogger logger in _loggers) 984_loggers = new List<ILogger>(); 985_distributedCentralLoggers = new List<ILogger>(); 1027public bool RegisterLogger(ILogger logger) 1117public bool RegisterDistributedLogger(ILogger centralLogger, LoggerDescription forwardingLogger) 1140/// supplied to the engine as already-constructed <see cref="ILogger"/> instances are unaffected and 1152private bool RegisterDistributedLoggerCore(ILogger centralLogger, LoggerDescription forwardingLogger, IForwardingLogger localForwardingLogger) 1574private void ShutdownLogger(ILogger logger) 1894private void InitializeLogger(ILogger logger, IEventSource sourceForLogger) 1896ILogger UnwrapLoggerType(ILogger log) 1942private void UpdateMinimumMessageImportance(ILogger logger) 1944var innerLogger = (logger is ReusableLogger reusableLogger) ? reusableLogger.OriginalLogger : logger;
BackEnd\Components\Logging\LoggingServiceLogMethods.cs (4)
414foreach (ILogger logger in Loggers) 416ILogger actualLogger = UnwrapLogger(logger); 456private ILogger UnwrapLogger(ILogger logger)
Definition\Project.cs (11)
1513public bool Build(ILogger logger) 1515var loggers = new List<ILogger>(1) { logger }; 1529public bool Build(IEnumerable<ILogger> loggers) 1545public bool Build(IEnumerable<ILogger> loggers, IEnumerable<ForwardingLoggerRecord> remoteLoggers) 1576public bool Build(string target, IEnumerable<ILogger> loggers) 1593public bool Build(string target, IEnumerable<ILogger> loggers, IEnumerable<ForwardingLoggerRecord> remoteLoggers) 1628public bool Build(string[] targets, IEnumerable<ILogger> loggers) 1646public bool Build(string[] targets, IEnumerable<ILogger> loggers, IEnumerable<ForwardingLoggerRecord> remoteLoggers) 1652/// See <see cref="Build(string[], IEnumerable&lt;ILogger&gt;, IEnumerable&lt;ForwardingLoggerRecord&gt;)"/>. 1660public bool Build(string[] targets, IEnumerable<ILogger> loggers, IEnumerable<ForwardingLoggerRecord> remoteLoggers, EvaluationContext evaluationContext) 3210public override bool Build(string[] targets, IEnumerable<ILogger> loggers, IEnumerable<ForwardingLoggerRecord> remoteLoggers, EvaluationContext evaluationContext)
Definition\ProjectCollection.cs (16)
253public ProjectCollection(IDictionary<string, string> globalProperties, IEnumerable<ILogger> loggers, ToolsetDefinitionLocations toolsetDefinitionLocations) 272public ProjectCollection(IDictionary<string, string> globalProperties, IEnumerable<ILogger> loggers, IEnumerable<ForwardingLoggerRecord> remoteLoggers, ToolsetDefinitionLocations toolsetDefinitionLocations, int maxNodeCount, bool onlyLogCriticalEvents) 292public ProjectCollection(IDictionary<string, string> globalProperties, IEnumerable<ILogger> loggers, IEnumerable<ForwardingLoggerRecord> remoteLoggers, ToolsetDefinitionLocations toolsetDefinitionLocations, int maxNodeCount, bool onlyLogCriticalEvents, bool loadProjectsReadOnly) 314/// This constructor disables target output logging, so TerminalLogger and other loggers may not work well. Prefer <see cref="ProjectCollection(IDictionary{string, string}, IEnumerable{ILogger}, IEnumerable{ForwardingLoggerRecord}, ToolsetDefinitionLocations, int, bool, bool, bool, bool, bool)"/> instead to control this behavior. 317public ProjectCollection(IDictionary<string, string> globalProperties, IEnumerable<ILogger> loggers, IEnumerable<ForwardingLoggerRecord> remoteLoggers, ToolsetDefinitionLocations toolsetDefinitionLocations, int maxNodeCount, bool onlyLogCriticalEvents, bool loadProjectsReadOnly, bool useAsynchronousLogging, bool reuseProjectRootElementCache) : 340public ProjectCollection(IDictionary<string, string> globalProperties, IEnumerable<ILogger> loggers, IEnumerable<ForwardingLoggerRecord> remoteLoggers, ToolsetDefinitionLocations toolsetDefinitionLocations, int maxNodeCount, bool onlyLogCriticalEvents, bool loadProjectsReadOnly, bool useAsynchronousLogging, bool reuseProjectRootElementCache, bool enableTargetOutputLogging) 359public ProjectCollection(IDictionary<string, string> globalProperties, IEnumerable<ILogger> loggers, IEnumerable<ForwardingLoggerRecord> remoteLoggers, ToolsetDefinitionLocations toolsetDefinitionLocations, int maxNodeCount, bool onlyLogCriticalEvents, bool loadProjectsReadOnly, bool useAsynchronousLogging, bool reuseProjectRootElementCache, bool enableTargetOutputLogging, string parseConfigDirectory) 378private ProjectCollection(IDictionary<string, string> globalProperties, IEnumerable<ILogger> loggers, ToolsetDefinitionLocations toolsetDefinitionLocations, int maxNodeCount, bool onlyLogCriticalEvents, bool loadProjectsReadOnly, bool useAsynchronousLogging, bool reuseProjectRootElementCache, bool enableTargetOutputLogging, string parseConfigDirectory) 718public ICollection<ILogger> Loggers 726? (ICollection<ILogger>)ReadOnlyEmptyCollection<ILogger>.Instance 727: new List<ILogger>(_loggingService.Loggers); 1417public void RegisterLogger(ILogger logger) 1432public void RegisterLoggers(IEnumerable<ILogger> loggers) 1439foreach (ILogger logger in loggers) 1825private void RegisterLoggerInternal(ILogger logger)
Instance\ProjectInstance.cs (12)
2252public bool Build(IEnumerable<ILogger> loggers) 2268public bool Build(IEnumerable<ILogger> loggers, IEnumerable<ForwardingLoggerRecord> remoteLoggers) 2285public bool Build(string target, IEnumerable<ILogger> loggers) 2303public bool Build(string target, IEnumerable<ILogger> loggers, IEnumerable<ForwardingLoggerRecord> remoteLoggers) 2322public bool Build(string[] targets, IEnumerable<ILogger> loggers) 2340public bool Build(string[] targets, IEnumerable<ILogger> loggers, IEnumerable<ForwardingLoggerRecord> remoteLoggers) 2359public bool Build(string[] targets, IEnumerable<ILogger> loggers, out IDictionary<string, TargetResult> targetOutputs) 2377public bool Build(string[] targets, IEnumerable<ILogger> loggers, IEnumerable<ForwardingLoggerRecord> remoteLoggers, out IDictionary<string, TargetResult> targetOutputs) 2846internal bool Build(string[] targets, IEnumerable<ILogger> loggers, IEnumerable<ForwardingLoggerRecord> remoteLoggers, ILoggingService loggingService, int maxNodeCount, out IDictionary<string, TargetResult> targetOutputs) 2864parameters.Loggers = (loggers is ICollection<ILogger> loggersCollection) ? loggersCollection : new List<ILogger>(loggers); 2902internal bool Build(string[] targets, IEnumerable<ILogger> loggers, IEnumerable<ForwardingLoggerRecord> remoteLoggers, ILoggingService loggingService, out IDictionary<string, TargetResult> targetOutputs)
Logging\LoggerDescription.cs (5)
187public ILogger CreateLogger() 197private ILogger CreateLogger(bool forwardingLogger) 199ILogger logger = null; 217LoadedType loggerClass = TypeLoader.Create<ILogger>().Load(_loggerClassName, _loggerAssembly, logWarning: (format, args) => { }); 222logger = (ILogger)Activator.CreateInstance(loggerClass.Type);
Logging\ReusableLogger.cs (8)
13/// The ReusableLogger wraps a <see cref="ILogger"/> and allows it to be used for both design-time and build-time. It internally swaps 14/// between the design-time and build-time event sources in response to <see cref="ILogger.Initialize"/> and <see cref="ILogger.Shutdown"/> events. 15/// Use this if you'd like to provide the same instance of an <see cref="ILogger"/> to both a 17/// directly during a call to one of the <see cref="ILogger"/>-accepting overloads of <see cref="Evaluation.Project.Build()"/>. 29private readonly ILogger _originalLogger; 34internal ILogger OriginalLogger => _originalLogger; 134public ReusableLogger(ILogger? originalLogger)
Logging\TerminalLogger\TerminalLogger.cs (5)
269public static ILogger CreateTerminalOrConsoleLogger(string[]? args = null) 281public static (ILogger, ForwardingLoggerRecord?) CreateTerminalOrConsoleLoggerWithForwarding(string[]? args = null) 288internal static (ILogger, ForwardingLoggerRecord?) CreateTerminalOrConsoleLoggerWithForwarding(string[]? args, bool supportsAnsi, bool outputIsScreen, uint? originalConsoleMode) 297ILogger loggerToReturn; 394static ForwardingLoggerRecord TerminalLoggerForwardingRecord(ILogger loggerToReturn, string? tlpArg, LoggerVerbosity verbosity)
ObjectModelRemoting\DefinitionObjectsLinks\ProjectLink.cs (1)
256public abstract bool Build(string[] targets, IEnumerable<ILogger> loggers, IEnumerable<ForwardingLoggerRecord> remoteLoggers, EvaluationContext evaluationContext);
parent\Shared\TypeLoader.cs (1)
132/// (for example <see cref="ITask"/> or <see cref="ILogger"/>).
Microsoft.Build.Framework (1)
FeatureSwitches.cs (1)
229/// engine as already-constructed <see cref="ILogger"/> instances are unaffected and remain the supported
Microsoft.Build.Utilities.Core (5)
MuxLogger.cs (5)
228public void RegisterLogger(int submissionId, ILogger logger) 350private readonly List<ILogger> _loggers; 473_loggers = new List<ILogger>(); 561internal void AddLogger(ILogger logger) 599foreach (ILogger logger in _loggers)
Microsoft.CodeAnalysis.Workspaces.MSBuild (11)
MSBuild\MSBuildProjectLoader.cs (6)
166/// <param name="msbuildLogger">An optional <see cref="ILogger"/> that will log MSBuild results.</param> 171ILogger? msbuildLogger = null, 225/// <param name="msbuildLogger">An optional <see cref="ILogger"/> that will log msbuild results.</param> 231ILogger? msbuildLogger = null, 263ILogger? msbuildLogger, 334private static bool IsBinaryLogger([NotNullWhen(returnValue: true)] ILogger? logger, out string? fileName)
MSBuild\MSBuildWorkspace.cs (5)
206/// <param name="msbuildLogger">An optional <see cref="ILogger"/> that will log msbuild results.</param> 212ILogger? msbuildLogger, 233/// <inheritdoc cref="OpenProjectAsync(string, ILogger, IProgress{ProjectLoadProgress}, CancellationToken)"/> 248/// <param name="msbuildLogger">An optional <see cref="ILogger"/> that will log msbuild results.</param> 259ILogger? msbuildLogger,
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (3)
Build\ProjectBuildManager.cs (3)
81public ProjectBuildManager(string[] knownCommandLineParserLanguages, Dictionary<string, string> globalProperties, ILogger? msbuildLogger = null, int? maxNodeCount = null) 94? new MSB.Framework.ILogger[] { msbuildLogger } 95: Array.Empty<MSB.Framework.ILogger>();
Microsoft.DotNet.HotReload.Utils.Generator (1)
BaselineProject.cs (1)
43ILogger? logger = null;
Microsoft.DotNet.HotReload.Watch (3)
Build\BuildReporter.cs (3)
10using IMSBuildLogger = Microsoft.Build.Framework.ILogger; 38public sealed class Loggers(ILogger logger, string? binLogPath) : IEnumerable<IMSBuildLogger>, IDisposable 59public IEnumerator<IMSBuildLogger> GetEnumerator()
MSBuild (32)
DistributedLoggerRecord.cs (3)
18internal DistributedLoggerRecord(ILogger centralLogger, LoggerDescription forwardingLoggerDescription) 29internal ILogger CentralLogger 51private ILogger _centralLogger;
FilteredBinlogReplay.cs (4)
159internal bool Replay(ILogger[] loggers, int cpuCount, CancellationToken cancellationToken) 169foreach (ILogger logger in loggers) 180List<ILogger> initializedLoggers = []; 184foreach (ILogger logger in loggers)
XMake.cs (25)
913ILogger[] loggers = Array.Empty<ILogger>(); 1048ILogger[] replayLoggers = distributedLoggerRecords 1425private static ExitType OutputBuildInformationInJson(BuildResult result, string[] getProperty, string[] getItem, string[] getTargetResult, ILogger[] loggers, ExitType exitType, TextWriter outputStream) 1429ILogger logger = loggers.FirstOrDefault(l => l is SimpleErrorLogger); 1597ILogger[] loggers, 1685foreach (var logger in loggers) 1716ILogger[] evaluationLoggers = 2444ref ILogger[] loggers, 3379internal static ProfilerLogger ProcessProfileEvaluationSwitch(string[] parameters, List<ILogger> loggers, out bool enableProfiler) 3859private static ILogger[] ProcessLoggingSwitches( 3902var loggers = new List<ILogger>(); 3985private static void ProcessFileLoggers(string[][] groupedFileLoggerParameters, List<DistributedLoggerRecord> distributedLoggerRecords, int cpuCount, List<ILogger> loggers) 4040private static void ProcessBinaryLogger(string[] binaryLoggerParameters, List<ILogger> loggers, ref LoggerVerbosity verbosity, bool disableCopies) 4092List<ILogger> loggers) 4139List<ILogger> loggers) 4185private static DistributedLoggerRecord CreateForwardingLoggerRecord(ILogger logger, string loggerParameters, LoggerVerbosity defaultVerbosity) 4366private static void ProcessLoggerSwitch(string[] parameters, List<ILogger> loggers, LoggerVerbosity verbosity) 4374if (CreateAndConfigureLogger(loggerDescription, verbosity, unquotedParameter, out ILogger logger)) 4400if (!CreateAndConfigureLogger(centralLoggerDescription, verbosity, unquotedParameter, out ILogger centralLogger)) 4515out ILogger logger) 4581ILogger[] loggers, 4600ILogger centralLogger = distributedLoggerRecord.CentralLogger; 4611foreach (var logger in loggers) 4638foreach (var logger in loggers)
NuGet.Build.Tasks.Console (4)
ConsoleLoggingQueue.cs (3)
68string ILogger.Parameters { get; set; } 113void ILogger.Initialize(IEventSource eventSource) 135void ILogger.Shutdown()
MSBuildStaticGraphRestore.cs (1)
1267var loggers = new List<Microsoft.Build.Framework.ILogger>
NuGet.CommandLine.XPlat (1)
Utility\MSBuildAPIUtility.cs (1)
938newProject.Build(new[] { CollectPackageReferences, CollectCentralPackageVersions }, new List<Microsoft.Build.Framework.ILogger> { }, out var targetOutputs);