-
Notifications
You must be signed in to change notification settings - Fork 239
logging changes #3087
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
Closed
Closed
logging changes #3087
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tlmii
reviewed
Dec 5, 2024
Member
|
@deepchoudhery Could you add some examples of how the logging options would be used by the end user in the PR description? They seem pretty straightforward, but I want to make sure. |
tlmii
reviewed
Dec 6, 2024
src/dotnet-scaffolding/Microsoft.DotNet.Scaffolding.Core/Builder/ScaffoldRunnerBuilder.cs
Outdated
Show resolved
Hide resolved
tlmii
reviewed
Dec 6, 2024
src/dotnet-scaffolding/Microsoft.DotNet.Scaffolding.Core/Logging/AnsiConsoleSink.cs
Outdated
Show resolved
Hide resolved
9692f55 to
ec1580d
Compare
tlmii
reviewed
Dec 10, 2024
src/dotnet-scaffolding/Microsoft.DotNet.Scaffolding.Core/Builder/ScaffoldRunnerBuilder.cs
Outdated
Show resolved
Hide resolved
src/dotnet-scaffolding/Microsoft.DotNet.Scaffolding.Core/Builder/ScaffoldRunnerBuilder.cs
Outdated
Show resolved
Hide resolved
src/dotnet-scaffolding/Microsoft.DotNet.Scaffolding.Core/Logging/AnsiConsoleSink.cs
Outdated
Show resolved
Hide resolved
...otnet-scaffolding/Microsoft.DotNet.Scaffolding.Core/Microsoft.DotNet.Scaffolding.Core.csproj
Show resolved
Hide resolved
src/dotnet-scaffolding/Microsoft.DotNet.Scaffolding.Roslyn/Services/MsBuildInitializer.cs
Outdated
Show resolved
Hide resolved
src/dotnet-scaffolding/Microsoft.DotNet.Scaffolding.Core/Builder/ScaffoldRunnerBuilder.cs
Outdated
Show resolved
Hide resolved
src/dotnet-scaffolding/Microsoft.DotNet.Scaffolding.Core/Builder/ScaffoldRunnerBuilder.cs
Outdated
Show resolved
Hide resolved
src/dotnet-scaffolding/Microsoft.DotNet.Scaffolding.Core/Builder/ScaffoldRunnerBuilder.cs
Outdated
Show resolved
Hide resolved
b018ca9 to
9392248
Compare
tlmii
previously approved these changes
Dec 12, 2024
9392248 to
7ce15c8
Compare
Member
|
closing, stale |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
changes :
CleanConsoleFormatter,CleanConsoleFormatterOptions,ConsoleLoggerExtensionsAnsiConsoleSinkdotnet-scaffoldand colorize output accordingly (let dotnet-scaffold do it if that's where output is going)ScaffolderRunnerBuilder--verboseand--log-to-fileCommandExecuteFlowStepand then read inScaffolderRunnerBuilderto configure theLoggerConfigurationall the different options and ways to enable logging:
dotnet-scaffold--verbose(bool option):Trace.ENABLE_VERBOSE_LOGGINGto "true".--log-to-file(bool option):InformationorTraceare the only options currently)LOG_TO_FILEto "true".dotnet-scaffold-aspnet/aspire: env vars above can be set manually (if running standalone) or throughdotnet-scaffoldoptionsENABLE_VERBOSE_LOGGINGenv varVerboseusingLoggerConfiguration().MinimumLevel.Verbose()ILogger.LogDebugandILogger.LogTraceare only enabled (and colorized using theAnsiConsoleSinkLOG_TO_FILEenv var.\%USERPROFILE%\.dotnet-scaffold\.logsfolder at the current location and add '.log' logs to this location-Xwith X being a number.DateTime.Now) since its the .NET standard and more uniform..logextension (the .NET standard).