Skip to content
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

[Feature Request] Ability to specify the log level when calling Docset.Build and Docset.Pdf #9836

Open
ramiabughazaleh opened this issue Apr 4, 2024 · 1 comment
Labels
fundamental Engineering system and core components

Comments

@ramiabughazaleh
Copy link

Description
I'm migrating from the docfx.exe console application to instead use the Docfx.App nuget package in my console application, but one of the things missing is the ability to set the log level.

For example, I used to be able to run docfx.exe docfx.json --logLevel Verbose but there doesn't seem to be an option when calling Docset.Build("docfx.json") or Docset.Pdf("docfx.json").

Proposed solution
I'd like to be able to set the log level in the Options parameter.

For example:

BuildOptions buildOptions = new BuildOptions
{
    LogLevel = LogLevel.Verbose,
};
Docset.Build("docfx.json", buildOptions);

Alternative solutions
I also thought about setting the log level in docfx.json like this:

{
  "rules": {
    "*": "verbose"
  }
}

but I didn't see any verbose logging output in the console for example.

Thank you.

@filzrev
Copy link
Contributor

filzrev commented Apr 4, 2024

Related issue (#8872)

For temporary workaround.
It can use internal RunBuild.Exec method directly.
By using IgnoresAccessChecksToGenerator.

Example configs of csproj .

  <ItemGroup>
    <PackageReference Include="IgnoresAccessChecksToGenerator" Version="0.7.0" PrivateAssets="All" />
    <InternalsAssemblyName Include="Docfx.App" />
    <InternalsAssemblyName Include="Docfx.Dotnet" />
  </ItemGroup>

@yufeih yufeih added the fundamental Engineering system and core components label Apr 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fundamental Engineering system and core components
Projects
None yet
Development

No branches or pull requests

3 participants