%DOCUMENTS% environment variable does not work in App.config file of a WPF application

0

I have a WPF application and want to use Serilog to log context in a local txt file. I have installed Serilog, Serilog.Sinks.File and Serilog.Settings.AppSettings packages.

After launching and terminating the tool, I fail to find the txt file in the folder. I guess I set the path value using wrong environment variable. Can someone helps me to correct?

In the App class in App.xaml.cs file, I add following code in the constructor App().

Log.Logger=new LoggerConfiguration().ReadFrom.AppSettings().CreateLogger();
Log.Information("##########################################################");
Log.Information("############## Tool started...###############");
Log.Information("##########################################################");

In the App.config file I add following key-value pairs to set logger.

<appSettings>
  <add key="serilog:minimum-level" value="Verbose" />
  <add key="serilog:using:File" value="Serilog.Sinks.File" />
  <add key="serilog:write-to:File.path" value="%DOCUMENTS%LogsTool-.txt" />
  <add key="serilog:write-to:File.rollingInterval" value="Day" />
  <add key="serilog:write-to:File.retainedFileCountLimit" value="10" />
</appSettings>

Update:

I changed the value to %USERPROFILE%DocumentsESI_Effort_A350LogsESIA350-.txt and it works now. Seems this to be a solution. But is there a direct environment varibale for Documents folder?