-
Notifications
You must be signed in to change notification settings - Fork 236
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
logging changes #3087
Draft
deepchoudhery
wants to merge
12
commits into
main
Choose a base branch
from
dev/decho/update-dotnet-scaffold-logging
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
logging changes #3087
Conversation
This file contains 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
@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
deepchoudhery
force-pushed
the
dev/decho/update-dotnet-scaffold-logging
branch
from
December 7, 2024 00:00
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
deepchoudhery
force-pushed
the
dev/decho/update-dotnet-scaffold-logging
branch
from
December 11, 2024 01:25
b018ca9
to
9392248
Compare
tlmii
approved these changes
Dec 12, 2024
deepchoudhery
force-pushed
the
dev/decho/update-dotnet-scaffold-logging
branch
from
December 13, 2024 21:11
9392248
to
7ce15c8
Compare
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
,ConsoleLoggerExtensions
AnsiConsoleSink
dotnet-scaffold
and colorize output accordingly (let dotnet-scaffold do it if that's where output is going)ScaffolderRunnerBuilder
--verbose
and--log-to-file
CommandExecuteFlowStep
and then read inScaffolderRunnerBuilder
to configure theLoggerConfiguration
all the different options and ways to enable logging:
dotnet-scaffold
--verbose
(bool option):Trace
.ENABLE_VERBOSE_LOGGING
to "true".--log-to-file
(bool option):Information
orTrace
are the only options currently)LOG_TO_FILE
to "true".dotnet-scaffold-aspnet/aspire
: env vars above can be set manually (if running standalone) or throughdotnet-scaffold
optionsENABLE_VERBOSE_LOGGING
env varVerbose
usingLoggerConfiguration().MinimumLevel.Verbose()
ILogger.LogDebug
andILogger.LogTrace
are only enabled (and colorized using theAnsiConsoleSink
LOG_TO_FILE
env var.\%USERPROFILE%\.dotnet-scaffold\.logs
folder at the current location and add '.log' logs to this location-X
with X being a number.DateTime.Now
) since its the .NET standard and more uniform..log
extension (the .NET standard).