How can we have Octopus substitute for variables with a colon ‘:’ as part of the variable name? Colons are used to indicate config file hierarchy in order to find the value to replace. But I have a scenario where part of the hierarchy has a name that includes a literal colon. How can I substitute for the log file path? See below.
This is what I tried but it didn’t work:
"Using": [ "Serilog.Sinks.File" ],
Thanks for getting in touch.
After looking at the serilog docs the
WriteTo config section shouldn’t need
:Async in it. Is there a reason why you need
:Async in the config name?
Unfortunately, there wouldn’t be a way for us to replace values under that property as
: is a hierarchical indicator in JSON files.
Thank you and best regards,
Thanks so much for the response. It seems Serilog has some inconsistencies with their documentation, and also with their functionality. I was using WriteTo:Async based on an example from here.
After removing the :Async (and making some other adjustments based on the various examples…), the logging functionality works seemingly the same. So that is good.
Serilog:WriteTo:0:Args:configure:0:Args:path now works for variable replacement in Octopus Deploy. Thanks again!