Thanks for reaching out! The problem with this approach is that we evaluate the JSON structure at the beginning of the process, and during the replacement you are changing the JSON structure once again. So by the time we try to modify Logging:SqlDB:LogLevel, Octopus still doesn’t know that new part of the JSON exists, because it wasn’t there when we initially loaded the JSON into memory.
Now, there’s an easy workaround for this using a variable within your variable:
Change your variable Logging to be {"RollingFile": {"LogLevel": 4 }, "SqlDB": {"LogLevel": #{SQLDBLogLevel} } }
Create a new variable called SQLDBLogLevel and assign the value 3 to it.