{"id":29031791,"url":"https://github.com/serilog-contrib/serilog-settings-xml","last_synced_at":"2025-06-26T10:05:32.915Z","repository":{"id":90329111,"uuid":"111860583","full_name":"serilog-contrib/serilog-settings-xml","owner":"serilog-contrib","description":"Xml file based configuration for Serilog (https://serilog.net)","archived":false,"fork":false,"pushed_at":"2021-02-12T12:05:47.000Z","size":29,"stargazers_count":5,"open_issues_count":7,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-14T11:09:00.139Z","etag":null,"topics":["serilog","serilog-configuration","xml-configuration"],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/serilog-contrib.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-11-24T00:30:57.000Z","updated_at":"2021-06-15T11:42:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"930a8a91-cefe-4d75-abdb-e0befd02c192","html_url":"https://github.com/serilog-contrib/serilog-settings-xml","commit_stats":null,"previous_names":["rsabirov/serilog-settings-xml"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/serilog-contrib/serilog-settings-xml","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serilog-contrib%2Fserilog-settings-xml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serilog-contrib%2Fserilog-settings-xml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serilog-contrib%2Fserilog-settings-xml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serilog-contrib%2Fserilog-settings-xml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/serilog-contrib","download_url":"https://codeload.github.com/serilog-contrib/serilog-settings-xml/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serilog-contrib%2Fserilog-settings-xml/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259896121,"owners_count":22928328,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["serilog","serilog-configuration","xml-configuration"],"created_at":"2025-06-26T10:05:32.326Z","updated_at":"2025-06-26T10:05:32.877Z","avatar_url":"https://github.com/serilog-contrib.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Serilog.Settings.Xml [![Build status](https://ci.appveyor.com/api/projects/status/y8yctf5c6v22clqh?svg=true)](https://ci.appveyor.com/project/rsabirov/serilog-settings-xml) [![NuGet](https://img.shields.io/nuget/dt/Serilog.Settings.Xml.svg)](https://www.nuget.org/packages/Serilog.Settings.Xml/)\n\nAn XML config reader for [Serilog](https://serilog.net).\n\n### Motivation\n\nXML based configuration can be more suitable for some projects, because:\n\n- xml transformations can be used\n- out of the box support in MS Deploy and Octopus Deploy\n- configuration consistency in leagacy (not .NET Core) projects \n\n### Getting started\n\nThe package needs to be installed from NuGet:\n\n```powershell\nInstall-Package Serilog.Settings.Xml\n```\n\nTo read configuration from xml configuration file use the `ReadFrom.Xml(filePath)` extension method on your `LoggerConfiguration`:\n\n```csharp\nLog.Logger = new LoggerConfiguration()\n  .ReadFrom.Xml(\"serilog.config\")\n  ... // Other configuration here\n  .CreateLogger()\n```\n\nYou can mix and match XML and code-based configuration, but each sink must be configured **either** using XML **or** in code - sinks added in code can't be modified via config file.\n    \n### Configuration sample\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"utf-8\" ?\u003e\n\n\u003cserilog\u003e\n\n    \u003cusing\u003e\n        \u003cadd name=\"Serilog.Enrichers.Thread\" /\u003e\n        \u003cadd name=\"Serilog.Enrichers.Process\" /\u003e\n        \u003cadd name=\"Serilog.Enrichers.Environment\" /\u003e\n        \u003cadd name=\"Serilog.Sinks.File\" /\u003e\n    \u003c/using\u003e\n\n    \u003cenrich\u003e\n        \u003cenricher name=\"FromLogContext\" /\u003e\n        \u003cenricher name=\"WithMachineName\" /\u003e\n        \u003cenricher name=\"WithThreadId\" /\u003e\n        \u003cenricher name=\"WithProcessId\" /\u003e\n        \u003cenricher name=\"WithEnvironmentUserName\" /\u003e\n    \u003c/enrich\u003e\n\n    \u003cproperties\u003e\n        \u003cproperty name=\"Application\" value=\"Sample\" /\u003e\n        \u003cproperty name=\"Path\" value=\"%PATH%\" /\u003e\n    \u003c/properties\u003e\n\n    \u003cminimumLevel default=\"Information\"\u003e\n        \u003coverride name=\"Microsoft\" level=\"Warning\" /\u003e\n        \u003coverride name=\"Microsoft.AspNetCore.Mvc\" level=\"Error\" /\u003e\n    \u003c/minimumLevel\u003e\n\n    \u003cwriteTo\u003e\n        \u003csink name=\"File\"\u003e\n            \u003carg name=\"path\" value=\"%TEMP%/Logs/serilog-configuration-sample.txt\" /\u003e\n        \u003c/sink\u003e\n    \u003c/writeTo\u003e\n\n\u003c/serilog\u003e\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fserilog-contrib%2Fserilog-settings-xml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fserilog-contrib%2Fserilog-settings-xml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fserilog-contrib%2Fserilog-settings-xml/lists"}