DocFX Version Used: 2.33.0 (docfx.console)
Template used: default
Expected Behavior:
User can define a logfile location in the docfx.json config file
Actual Behavior:
The user can't define a logfile location, the log is always written to the same directory as the docfx.json
Hi @Roraa with -l <logFileName>, you can use relative path or absolute path for logFileName, for example, E:\logs\1.log and logs\1.log are both supported.
Hi Vicancy, thanks for the reply! Could you help me out in configuring that for the DocFX.Console nuget package? We don't execute docfx ourselves, we use the nuget package instead which adds targets to the msbuild pipeline.
Hi @Roraa you can overwrite LogFile property in your .csproj before import docfx.console.targets, as similar to:
<PropertyGroup>
<LogFile>logs\log.txt</LogFile>
</PropertyGroup>
@vicancy thanks, we don't have a docfx.console.targets import so I added the property group in the top of our csproj and it's working now :+1:
Most helpful comment
Hi @Roraa you can overwrite
LogFileproperty in your.csprojbefore importdocfx.console.targets, as similar to: