-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Added a message of enabled logs, and their paths. #13577
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 7 commits
a93b3f1
49bb7f1
6f3fbbd
54be972
1f7c117
a598edd
4aff18e
f3037a6
98219f3
b9209d2
3c610fb
875ce4f
04acb06
7e2f60f
42b7457
5a46865
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider adding tests to |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -82,6 +82,7 @@ public void VerifyEventType() | |
| BuildCheckTracingEventArgs buildCheckTracing = new(); | ||
| BuildCanceledEventArgs buildCanceled = new("message", DateTime.UtcNow); | ||
| WorkerNodeTelemetryEventArgs workerNodeTelemetry = new(); | ||
| LoggerRegisteredEventArgs loggerRegistered = new(new List<RegisteredLoggerInfo> { new RegisteredLoggerInfo("FileLogger", new[] { @"C:\logs\build.log" }) }); | ||
|
|
||
| VerifyLoggingPacket(buildFinished, LoggingEventType.BuildFinishedEvent); | ||
| VerifyLoggingPacket(buildStarted, LoggingEventType.BuildStartedEvent); | ||
|
|
@@ -119,6 +120,7 @@ public void VerifyEventType() | |
| VerifyLoggingPacket(buildCheckTracing, LoggingEventType.BuildCheckTracingEvent); | ||
| VerifyLoggingPacket(buildCanceled, LoggingEventType.BuildCanceledEvent); | ||
| VerifyLoggingPacket(workerNodeTelemetry, LoggingEventType.WorkerNodeTelemetryEvent); | ||
| VerifyLoggingPacket(loggerRegistered, LoggingEventType.LoggerRegisteredEvent); | ||
| } | ||
|
|
||
| private static BuildEventContext CreateBuildEventContext() | ||
|
|
@@ -321,6 +323,11 @@ public void TestTranslation() | |
| BuildEventContext = new BuildEventContext(1, 2, 3, 4, 5, 6, 7) | ||
| }, | ||
| new GeneratedFileUsedEventArgs("path", "some content"), | ||
| new LoggerRegisteredEventArgs(new List<RegisteredLoggerInfo> | ||
| { | ||
| new RegisteredLoggerInfo("FileLogger", new[] { @"C:\logs\build.log" }), | ||
| new RegisteredLoggerInfo("BinaryLogger"), | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should add more loggers that use various properties of |
||
| }), | ||
| }; | ||
| foreach (BuildEventArgs arg in testArgs) | ||
| { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| // Licensed to the .NET Foundation under one or more agreements. | ||
| // The .NET Foundation licenses this file to you under the MIT license. | ||
|
|
||
| namespace Microsoft.Build.Logging | ||
| { | ||
| internal interface IFileOutputLogger | ||
| { | ||
| string OutputFilePath { get; } | ||
|
AlesProkop marked this conversation as resolved.
Outdated
|
||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -170,6 +170,14 @@ | |||||
| <data name="BuildFinishedSuccess" xml:space="preserve"> | ||||||
| <value>Build succeeded.</value> | ||||||
| </data> | ||||||
| <data name="LogFileOutputPath" xml:space="preserve"> | ||||||
|
AlesProkop marked this conversation as resolved.
|
||||||
| <value>{0}: {1}</value> | ||||||
|
AlesProkop marked this conversation as resolved.
Outdated
|
||||||
| <comment>{0} is the logger name. {1} is the full file path.</comment> | ||||||
| </data> | ||||||
| <data name="LogEnabledLogs" xml:space="preserve"> | ||||||
| <value>Enabled logs: {0}</value> | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| <comment>{0} is a comma-separated list of log types (e.g. "Binary log", "File log").</comment> | ||||||
| </data> | ||||||
| <data name="BuildStartedWithTime" xml:space="preserve"> | ||||||
| <value>Build started {0}.</value> | ||||||
| </data> | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: this name is confusing - it does not explain the test. Should it be
LogBuildStartedLogsLoggerNames?