Is there a way to set verbosity other than the command line argument? #4947
Replies: 3 comments 4 replies
|
On phone now, but don't think there's a configuration for verbosity. But verbosity is get/set so it's possible to set it in i.e. Setup task like Cake itself does here Line 22 in 59eb19d If you just want to have more verbose tool execution logging then there's Show Process Command Line configuration which can be set via environmental variables, config and argument |
|
Unfortunately, by the time Setup is invoked, the I tried something like this: new CakeHost()
.ConfigureServices(services =>
{
services.AddSingleton<ICakeLog>(sp =>
{
var frostingContext = sp.GetRequiredService<IFrostingContext>(); // <-- infinite loop
if (!Enum.TryParse<Verbosity>(frostingContext.Environment.GetEnvironmentVariable("CAKE_SETTINGS_VERBOSITY"), true, out var verbosity))
{
verbosity = Verbosity.Normal;
}
return ActivatorUtilities.CreateInstance<CakeBuildLog>(sp, verbosity);
});
})But I got into an infinite loop with |
|
The problem here is that I want What's working for me now is this: |
Uh oh!
There was an error while loading. Please reload this page.
Is there an environment variable that can set a default?
Can it be done using a module?
All reactions