I have a log4net config with email appender configured. I’m using OctopusDeploy to set email appender’s threshold to either “OFF” or “ERROR” depending on which environment i’m deploying to. The variable in Octopus looks like this:
env.log4net.errorsEmailAppenderThreshold = “ERROR” (no scopes)
env.log4net.errorsEmailAppenderThreshold = “OFF” (Dev1)
So basically, “OFF” threshold will be set on any dev environment (ie Dev1) otherwise it’ll be set to ERROR.
My log4net.config contains the following line referencing the variable:
What i’m seeing is really trippy. I tried deploying to Dev1 and saw that Octopus was setting threshold to “ERROR”! I triple checked everything and it just didn’t make sense. So I renamed the variable from “ERROR” to “ERROR!!”, deployed again and saw “ERROR” in the threshold value again! This started to look crazy so I deleted the variables in OctopusDeploy and recreated them and only then it started setting threshold to “OFF” as expected.
Now i changed the deployment process to deploy yet another service via deploy package step with its own log4net config. Both services are deployed within the same project in Octopus so same sets of variables are applied. And low and behold the problem has come back. I am now seeing “ERROR” in Dev1 for this new project and “OFF” in the first project. This makes absolutely no sense. It’s applying correctly in one deployment but not the other. I tried recreating variables again, but this doesn’t seem to change anything.
I’m using Octopus 3.2.22. Does anybody have suggestions?