Skip to content

Environment variables in file path don't work on Linux #257

@TehGM

Description

@TehGM

I have following config in my JSON file:

"WriteTo": [
  {
    "Name": "Async",
    "Args": {
      "configure": [
        {
          "Name": "File",
          "Args": {
            "path": "%PROGRAMDATA%/TehGM/fsriev/logs/log-.log",
            "rollingInterval": "Day",
            "retainedFileCountLimit": 30,
            "fileSizeLimitBytes": 2097152,
            "rollOnFileSizeLimit": true,
            "buffered": false
          }
        }
      ]
    }
  }
]

This works as expected on Windows 10. However, when the application is ran on Debian, folder of name %PROGRAMDATA% is created instead. I also tried %APPDATA%:
obraz

When using special folders feature using in-code configuration, they work perfectly fine.

Library version: 3.1.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions