I need to deploy my project on 3 environments
I use Azure DevOps CI and CD. I can build, deploy, and I use the group variables to update my Web.config file. I can only change the variables in section as explained on the build definition help
Now I would like to add a NLog section or use the NLog.config file to define my log on each of these environments. How can I do.
The thing is I have many variables and option in my logs. At some point it will be more easier to copy the entire log file (Let's say I prefer to use NLog.config) than applying a transformation. Log on staging may be completely different than the one on production. This is why I use Nlog.
So yes. I could simply have a log file for each of my environments in my repository... but no. I don't like the idea because there are some variable I want to keep secret. Developers don't need to know the details of the log here.
So, is it possible to store entire log file in Azure DevOps and integrate it to the deployment process? Or maybe I can copy it from another folder on my server. Or maybe I can just make sure I do not override this file during the copy?
I prefer the first solution because my original file is stored properly with all my deployment definitions. I just have to look at my DevOps definition to check what should be my settings and if someone do a wrong manipulation on the server I still have my original file.