I'm using Octopus as part of our deployment for a .NET Core 3.1 Web API project.
log4net.config
exists in .\Utility\Logs
.
I'm trying to follow the pattern here: https://help.octopus.com/t/transformation-best-practice-log4net-config-or-any-non-web-app-config/9906/4
As I understand it, this consists of three parts:
Create
Log4Net.DeploymentTransform.config
, with the variables in#{name}
format - this has been done.Turn on the "Substitute variables in files" feature, and point at the
Log4Net.DeploymentTransform.config
transformation file (variable replacement happens before transformation). That would result in the#{LogFileLocation}
variable being replaced with whatever value was set for yourLogFileLocation
variable in the current scope.This is done and is working.when my app is deployed,
Log4Net.DeploymentTransform.config
is there as well and the variable has been successfully set in it.You'd also turn on the configuration transforms feature, and fill out the additional transforms section in the configuration transforms feature to identify your transform file (e.g.
Log4Net.DeploymentTransform.config
=>log4net.config
).This is not working, the content of
Log4Net.DeploymentTransform.config
is not being copied on top oflog4net.config
, though they are in the same folder upon deployment.
Here is what I did in our "deploy step"
Which sure looks like what the article is saying to do.
What else should I check? Any idea why step 3 isn't occurring?