Skip to content

[Enhancement]: Log file sink #2252

@JerryNixon

Description

@JerryNixon

Today, we support a sink to Application Insights:

{
    "telemetry": {
        "application-insights": {
            "enabled": true,
            ...
        }
    }
}

Proposing a file sink for local storage. This is particularly relevant for customers who do not have Application Insights as an option and want more than just Console output.

{
    "telemetry": {
        "application-insights": {
            "enabled": true,
            ...
        },
        "local-file": {
            "enabled": true,
            "file-path": "/path/to/logfile.log",
            "max-file-size": 10485760, // 10 MB in bytes
            "max-backup-files": 5,
            "rollover-interval": "daily" // options: 'daily', 'weekly', 'monthly'
        }
    }
}

Properties:

  1. enabled: (Boolean) Enables or disables the local file logging.
  2. file-path: (String) Specifies the path to the log file.
  3. max-file-size: (Integer) The maximum size of the log file in bytes before it rolls over.
  4. max-backup-files: (Integer) The maximum number of backup files to retain.
  5. rollover-interval: (String) Defines how often the log file should roll over (e.g., daily, weekly, monthly).

Related: https://github.com/serilog/serilog-settings-configuration

Metadata

Metadata

Assignees

No one assigned

    Labels

    criCustomer Reported issueenhancementNew feature or requesttriageissues to be triaged

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions