Variable Names with a colon in the name?

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:

    "Serilog": {
   "Using": [ "Serilog.Sinks.File" ],
    "MinimumLevel": "Debug",
    "WriteTo:Async": {
      "Name": "Async",
      "Args": {
        "configure": [
            "Name": "File",
            "Args": {
              "path": "C:/Logs/TaskEngine.txt",
              "rollingInterval": "Day",
              "fileSizeLimitBytes": 5242880,
              "retainedFileCountLimit": 50

Hi David,

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.

Using Serilog:WriteTo:0:Args:configure:0:Args:path now works for variable replacement in Octopus Deploy. Thanks again!