Xml transformation for logging.config

Hello
I am trying to make xml transformation working. First, it takes me a while to understand how it was supposed to work. As far as i understand, i created a web.release.config containing an octopus variable. In octopus I checked “Automatically run configuration transformation files” and i needed to enable Substitute variables in files and enter explicitly “web.release.config”.

Then my application web.config uses to externalize the logging configuration.
How can i transform the logging.config ?

Hi Sebastien,

Thanks for getting in touch! So a few things here, lets see if I can explain them well enough.

If all of your required variables in your configuration transformations exist in AppSettings and ConnectionStrings you have no need for Substitute Variables in Files.
You can define non-standard config names using the additional configurations settings. Please see my attached screenshots.

If you have variables outside of AppSettings or ConnectionStrings that need to be evaluated thats when you have to use Substitute Variables in Files. Please see my other screenshots!

Please let me know if I can explain any part of this in further detail.
Vanessa

Thanks for the clear answer.
In your screenshot “configurationfilesfeautresadditional.PNG”, you have tips and tricks that i dont have in my version of octupus (version 2.5.8.447, see the enclosed file) do i need to upgrade to have the same behaviour ?
in the same file you mentioned that i can modify a logging.config file by a logging.config transformation file, how is it possible, : a config file can contain an xml transformation ?

Is there a way with octopus to have the transformation file outside the nugget package we are installing ? I am thinking of having a common transformation file that is store somewhere that i can ‘call’ so that all my config transformation would be consistent for all the application i install. What is the best practice you advice to make sure the config files are consistent based on some rules (the log path are the same, the connectionstring are well used). I dont know if it the scope of octpus but managing our config file is very chalenging for us as we have a lot of them.

thank you for your help
sebastien

sorry for my stupid question about the tips and tricks and the octopus version i just click on the help button.

Hi Sebastien,

Glad you figured out the tips and tricks was from the help button.
If your file is a transformation file (sorry I have to make assumptions based on names) then you can use the additional transformations features, but it will still only pick up AppSettings and ConnectionStrings for variables. For any other type of file, you need to use substitute variables in files features. If you look at the following blog post and ignore everything but the substitution part you will see that this allows you to have any type of file defined and substitute variables inside of it. http://octopusdeploy.com/blog/deploy-php-to-iis-with-octopus

Hope I am making it clearer!!
Vanessa