1 interface inheriting from ILogger
Microsoft.Build.Framework (1)
INodeLogger.cs (1)
20
public interface INodeLogger :
ILogger
9 implementations of ILogger
dotnet (1)
LoggerUtility.cs (1)
175
internal class FacadeLogger(PersistentDispatcher dispatcher) :
ILogger
Microsoft.Build (5)
BackEnd\BuildManager\BuildManager.cs (1)
3588
internal class NullLogger :
ILogger
BuildCheck\Infrastructure\BuildCheckConnectorLogger.cs (1)
16
internal sealed class BuildCheckConnectorLogger :
ILogger
Logging\BinaryLogger\BinaryLogger.cs (1)
51
public sealed class BinaryLogger :
ILogger
, IFileOutputLogger
Logging\ProfilerLogger.cs (1)
23
public sealed class ProfilerLogger :
ILogger
TelemetryInfra\InternalTelemetryConsumingLogger.cs (1)
11
internal sealed class InternalTelemetryConsumingLogger :
ILogger
Microsoft.Build.Utilities.Core (1)
Logger.cs (1)
15
public abstract class Logger :
ILogger
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (1)
MSBuild\Logging\MSBuildDiagnosticLogger.cs (1)
12
internal sealed class MSBuildDiagnosticLogger : MSB.Framework.
ILogger
NuGet.Build.Tasks.Console (1)
ConsoleLoggingQueue.cs (1)
28
internal class ConsoleLoggingQueue : LoggingQueue<ConsoleOutLogItem>, IBuildEngine,
ILogger
156 references to ILogger
dotnet (8)
Commands\Run\CommonRunHelpers.cs (1)
50
public static Microsoft.Build.Framework.
ILogger
GetConsoleLogger(MSBuildArgs args) =>
Commands\Run\RunCommand.cs (2)
611
static ProjectInstance EvaluateProject(string? projectFilePath, Func<ProjectCollection, ProjectInstance>? projectFactory, MSBuildArgs msbuildArgs,
ILogger
? binaryLogger)
693
List<
ILogger
> loggersForBuild = [
Commands\Run\RunCommandSelector.cs (1)
601
private IEnumerable<
ILogger
> GetLoggers()
Commands\Run\VirtualProjectBuildingCommand.cs (4)
176
var
consoleLogger = NoConsoleLogger
289
ReadOnlySpan<
ILogger
> binaryLoggers = binaryLogger is null ? [] : [binaryLogger.Value];
290
ReadOnlySpan<
ILogger
> consoleLoggers = consoleLogger is null ? [] : [consoleLogger];
291
IEnumerable<
ILogger
> loggers = [.. binaryLoggers, .. consoleLoggers];
dotnet-format (1)
Workspaces\MSBuildWorkspaceLoader.cs (1)
39
Build.Framework.
ILogger
? binlog = null;
Microsoft.Build (88)
BackEnd\BuildManager\BuildManager.cs (5)
748
IEnumerable<
ILogger
> AppendDebuggingLoggers(IEnumerable<
ILogger
> loggers)
3188
IEnumerable<
ILogger
>? loggers,
3231
ILogger
buildCheckLogger =
3267
foreach (
ILogger
logger in loggers)
BackEnd\BuildManager\BuildParameters.cs (4)
159
private IEnumerable<
ILogger
> _loggers;
301
_loggers = other._loggers != null ? new List<
ILogger
>(other._loggers) : null;
528
public IEnumerable<
ILogger
> Loggers
536
foreach (
ILogger
logger in value)
BackEnd\Components\Logging\ForwardingLoggerRecord.cs (2)
19
public ForwardingLoggerRecord(
ILogger
centralLogger, LoggerDescription forwardingLoggerDescription)
31
public
ILogger
CentralLogger
BackEnd\Components\Logging\ILoggingService.cs (3)
111
ICollection<
ILogger
> Loggers
331
bool RegisterDistributedLogger(
ILogger
centralLogger, LoggerDescription forwardingLogger);
338
bool RegisterLogger(
ILogger
logger);
BackEnd\Components\Logging\LoggingService.cs (15)
135
private List<
ILogger
> _loggers;
313
_loggers = new List<
ILogger
>();
508
public ICollection<
ILogger
> Loggers => _loggers;
816
foreach (
ILogger
logger in _loggers)
943
foreach (
ILogger
logger in _loggers)
969
foreach (
ILogger
logger in _loggers)
982
_loggers = new List<
ILogger
>();
1024
public bool RegisterLogger(
ILogger
logger)
1113
public bool RegisterDistributedLogger(
ILogger
centralLogger, LoggerDescription forwardingLogger)
1507
private void ShutdownLogger(
ILogger
logger)
1827
private void InitializeLogger(
ILogger
logger, IEventSource sourceForLogger)
1829
ILogger
UnwrapLoggerType(
ILogger
log)
1875
private void UpdateMinimumMessageImportance(
ILogger
logger)
1877
var
innerLogger = (logger is ReusableLogger reusableLogger) ? reusableLogger.OriginalLogger : logger;
BackEnd\Components\Logging\LoggingServiceLogMethods.cs (4)
414
foreach (
ILogger
logger in Loggers)
416
ILogger
actualLogger = UnwrapLogger(logger);
456
private
ILogger
UnwrapLogger(
ILogger
logger)
Definition\Project.cs (11)
1505
public bool Build(
ILogger
logger)
1507
var loggers = new List<
ILogger
>(1) { logger };
1520
public bool Build(IEnumerable<
ILogger
> loggers)
1535
public bool Build(IEnumerable<
ILogger
> loggers, IEnumerable<ForwardingLoggerRecord> remoteLoggers)
1564
public bool Build(string target, IEnumerable<
ILogger
> loggers)
1580
public bool Build(string target, IEnumerable<
ILogger
> loggers, IEnumerable<ForwardingLoggerRecord> remoteLoggers)
1613
public bool Build(string[] targets, IEnumerable<
ILogger
> loggers)
1630
public bool Build(string[] targets, IEnumerable<
ILogger
> loggers, IEnumerable<ForwardingLoggerRecord> remoteLoggers)
1636
/// See <see cref="Build(string[], IEnumerable<
ILogger
>, IEnumerable<ForwardingLoggerRecord>)"/>.
1643
public bool Build(string[] targets, IEnumerable<
ILogger
> loggers, IEnumerable<ForwardingLoggerRecord> remoteLoggers, EvaluationContext evaluationContext)
3338
public override bool Build(string[] targets, IEnumerable<
ILogger
> loggers, IEnumerable<ForwardingLoggerRecord> remoteLoggers, EvaluationContext evaluationContext)
Definition\ProjectCollection.cs (14)
253
public ProjectCollection(IDictionary<string, string> globalProperties, IEnumerable<
ILogger
> loggers, ToolsetDefinitionLocations toolsetDefinitionLocations)
271
public ProjectCollection(IDictionary<string, string> globalProperties, IEnumerable<
ILogger
> loggers, IEnumerable<ForwardingLoggerRecord> remoteLoggers, ToolsetDefinitionLocations toolsetDefinitionLocations, int maxNodeCount, bool onlyLogCriticalEvents)
290
public ProjectCollection(IDictionary<string, string> globalProperties, IEnumerable<
ILogger
> loggers, IEnumerable<ForwardingLoggerRecord> remoteLoggers, ToolsetDefinitionLocations toolsetDefinitionLocations, int maxNodeCount, bool onlyLogCriticalEvents, bool loadProjectsReadOnly)
312
/// 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.
314
public ProjectCollection(IDictionary<string, string> globalProperties, IEnumerable<
ILogger
> loggers, IEnumerable<ForwardingLoggerRecord> remoteLoggers, ToolsetDefinitionLocations toolsetDefinitionLocations, int maxNodeCount, bool onlyLogCriticalEvents, bool loadProjectsReadOnly, bool useAsynchronousLogging, bool reuseProjectRootElementCache) :
336
public 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)
647
public ICollection<
ILogger
> Loggers
655
? (ICollection<
ILogger
>)ReadOnlyEmptyCollection<
ILogger
>.Instance
656
: new List<
ILogger
>(_loggingService.Loggers);
1346
public void RegisterLogger(
ILogger
logger)
1361
public void RegisterLoggers(IEnumerable<
ILogger
> loggers)
1368
foreach (
ILogger
logger in loggers)
1753
private void RegisterLoggerInternal(
ILogger
logger)
Instance\ProjectInstance.cs (12)
2197
public bool Build(IEnumerable<
ILogger
> loggers)
2212
public bool Build(IEnumerable<
ILogger
> loggers, IEnumerable<ForwardingLoggerRecord> remoteLoggers)
2228
public bool Build(string target, IEnumerable<
ILogger
> loggers)
2245
public bool Build(string target, IEnumerable<
ILogger
> loggers, IEnumerable<ForwardingLoggerRecord> remoteLoggers)
2263
public bool Build(string[] targets, IEnumerable<
ILogger
> loggers)
2280
public bool Build(string[] targets, IEnumerable<
ILogger
> loggers, IEnumerable<ForwardingLoggerRecord> remoteLoggers)
2298
public bool Build(string[] targets, IEnumerable<
ILogger
> loggers, out IDictionary<string, TargetResult> targetOutputs)
2315
public bool Build(string[] targets, IEnumerable<
ILogger
> loggers, IEnumerable<ForwardingLoggerRecord> remoteLoggers, out IDictionary<string, TargetResult> targetOutputs)
2781
internal bool Build(string[] targets, IEnumerable<
ILogger
> loggers, IEnumerable<ForwardingLoggerRecord> remoteLoggers, ILoggingService loggingService, int maxNodeCount, out IDictionary<string, TargetResult> targetOutputs)
2799
parameters.Loggers = (loggers is ICollection<
ILogger
> loggersCollection) ? loggersCollection : new List<
ILogger
>(loggers);
2836
internal bool Build(string[] targets, IEnumerable<
ILogger
> loggers, IEnumerable<ForwardingLoggerRecord> remoteLoggers, ILoggingService loggingService, out IDictionary<string, TargetResult> targetOutputs)
Logging\LoggerDescription.cs (4)
184
public
ILogger
CreateLogger()
193
private
ILogger
CreateLogger(bool forwardingLogger)
195
ILogger
logger = null;
218
logger = (
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()"/>.
29
private readonly
ILogger
_originalLogger;
34
internal
ILogger
OriginalLogger => _originalLogger;
134
public ReusableLogger(
ILogger
? originalLogger)
Logging\TerminalLogger\TerminalLogger.cs (5)
269
public static
ILogger
CreateTerminalOrConsoleLogger(string[]? args = null)
281
public static (
ILogger
, ForwardingLoggerRecord?) CreateTerminalOrConsoleLoggerWithForwarding(string[]? args = null)
288
internal static (
ILogger
, ForwardingLoggerRecord?) CreateTerminalOrConsoleLoggerWithForwarding(string[]? args, bool supportsAnsi, bool outputIsScreen, uint? originalConsoleMode)
297
ILogger
loggerToReturn;
394
static ForwardingLoggerRecord TerminalLoggerForwardingRecord(
ILogger
loggerToReturn, string? tlpArg, LoggerVerbosity verbosity)
ObjectModelRemoting\DefinitionObjectsLinks\ProjectLink.cs (1)
254
public abstract bool Build(string[] targets, IEnumerable<
ILogger
> loggers, IEnumerable<ForwardingLoggerRecord> remoteLoggers, EvaluationContext evaluationContext);
Microsoft.Build.Utilities.Core (5)
MuxLogger.cs (5)
228
public void RegisterLogger(int submissionId,
ILogger
logger)
350
private readonly List<
ILogger
> _loggers;
473
_loggers = new List<
ILogger
>();
561
internal void AddLogger(
ILogger
logger)
599
foreach (
ILogger
logger in _loggers)
Microsoft.CodeAnalysis.Workspaces.MSBuild (10)
MSBuild\MSBuildProjectLoader.cs (6)
155
/// <param name="msbuildLogger">An optional <see cref="
ILogger
"/> that will log MSBuild results.</param>
160
ILogger
? msbuildLogger = null,
214
/// <param name="msbuildLogger">An optional <see cref="
ILogger
"/> that will log msbuild results.</param>
220
ILogger
? msbuildLogger = null,
252
ILogger
? msbuildLogger,
317
private static bool IsBinaryLogger([NotNullWhen(returnValue: true)]
ILogger
? logger, out string? fileName)
MSBuild\MSBuildWorkspace.cs (4)
196
/// <param name="msbuildLogger">An optional <see cref="
ILogger
"/> that will log msbuild results.</param>
202
ILogger
? msbuildLogger,
244
/// <param name="msbuildLogger">An optional <see cref="
ILogger
"/> that will log msbuild results..</param>
250
ILogger
? msbuildLogger,
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (3)
Build\ProjectBuildManager.cs (3)
68
public ProjectBuildManager(string[] knownCommandLineParserLanguages, Dictionary<string, string> globalProperties,
ILogger
? msbuildLogger = null, int? maxNodeCount = null)
81
? new MSB.Framework.
ILogger
[] { msbuildLogger }
82
: Array.Empty<MSB.Framework.
ILogger
>();
Microsoft.DotNet.HotReload.Utils.Generator (1)
BaselineProject.cs (1)
43
ILogger
? logger = null;
Microsoft.DotNet.HotReload.Watch (3)
Build\BuildReporter.cs (3)
10
using IMSBuildLogger = Microsoft.Build.Framework.
ILogger
;
38
public sealed class Loggers(ILogger logger, string? binLogPath) : IEnumerable<
IMSBuildLogger
>, IDisposable
59
public IEnumerator<
IMSBuildLogger
> GetEnumerator()
MSBuild (27)
DistributedLoggerRecord.cs (3)
18
internal DistributedLoggerRecord(
ILogger
centralLogger, LoggerDescription forwardingLoggerDescription)
29
internal
ILogger
CentralLogger
51
private
ILogger
_centralLogger;
XMake.cs (24)
828
ILogger
[] loggers = Array.Empty<
ILogger
>();
1296
private static ExitType OutputBuildInformationInJson(BuildResult result, string[] getProperty, string[] getItem, string[] getTargetResult,
ILogger
[] loggers, ExitType exitType, TextWriter outputStream)
1300
ILogger
logger = loggers.FirstOrDefault(l => l is SimpleErrorLogger);
1450
ILogger
[] loggers,
1532
foreach (
var
logger in loggers)
1563
ILogger
[] evaluationLoggers =
2179
ref
ILogger
[] loggers,
3059
internal static ProfilerLogger ProcessProfileEvaluationSwitch(string[] parameters, List<
ILogger
> loggers, out bool enableProfiler)
3488
private static
ILogger
[] ProcessLoggingSwitches(
3530
var loggers = new List<
ILogger
>();
3608
private static void ProcessFileLoggers(string[][] groupedFileLoggerParameters, List<DistributedLoggerRecord> distributedLoggerRecords, int cpuCount, List<
ILogger
> loggers)
3663
private static void ProcessBinaryLogger(string[] binaryLoggerParameters, List<
ILogger
> loggers, ref LoggerVerbosity verbosity)
3715
List<
ILogger
> loggers)
3762
List<
ILogger
> loggers)
3808
private static DistributedLoggerRecord CreateForwardingLoggerRecord(
ILogger
logger, string loggerParameters, LoggerVerbosity defaultVerbosity)
3989
private static void ProcessLoggerSwitch(string[] parameters, List<
ILogger
> loggers, LoggerVerbosity verbosity)
3997
if (CreateAndConfigureLogger(loggerDescription, verbosity, unquotedParameter, out
ILogger
logger))
4023
if (!CreateAndConfigureLogger(centralLoggerDescription, verbosity, unquotedParameter, out
ILogger
centralLogger))
4138
out
ILogger
logger)
4204
ILogger
[] loggers,
4223
ILogger
centralLogger = distributedLoggerRecord.CentralLogger;
4234
foreach (
var
logger in loggers)
4261
foreach (
var
logger in loggers)
NuGet.Build.Tasks.Console (9)
ConsoleLoggingQueue.cs (8)
27
/// This class implements <see cref="
ILogger
" /> so that it can be passed to MSBuild APIs that require an ILogger to log messages.</remarks>
67
/// <inheritdoc cref="
ILogger
.Parameters" />
68
string
ILogger
.Parameters { get; set; }
78
/// <inheritdoc cref="
ILogger
.Verbosity" />
112
/// <inheritdoc cref="
ILogger
.Initialize" />
113
void
ILogger
.Initialize(IEventSource eventSource)
134
/// <inheritdoc cref="
ILogger
.Shutdown" />
135
void
ILogger
.Shutdown()
MSBuildStaticGraphRestore.cs (1)
1237
var loggers = new List<Microsoft.Build.Framework.
ILogger
>
NuGet.CommandLine.XPlat (1)
Utility\MSBuildAPIUtility.cs (1)
935
newProject.Build(new[] { CollectPackageReferences, CollectCentralPackageVersions }, new List<Microsoft.Build.Framework.
ILogger
> { }, out var targetOutputs);