{"action":"created","issue":{"url":"https://api.github.com/repos/serilog/serilog/issues/430","labels_url":"https://api.github.com/repos/serilog/serilog/issues/430/labels{/name}","comments_url":"https://api.github.com/repos/serilog/serilog/issues/430/comments","events_url":"https://api.github.com/repos/serilog/serilog/issues/430/events","html_url":"https://github.com/serilog/serilog/issues/430","id":69519933,"number":430,"title":"Support multiple sets of AppSettings using a custom prefix.","user":{"login":"andrewcupper","id":7790750,"avatar_url":"https://avatars.githubusercontent.com/u/7790750?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewcupper","html_url":"https://github.com/andrewcupper","followers_url":"https://api.github.com/users/andrewcupper/followers","following_url":"https://api.github.com/users/andrewcupper/following{/other_user}","gists_url":"https://api.github.com/users/andrewcupper/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewcupper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewcupper/subscriptions","organizations_url":"https://api.github.com/users/andrewcupper/orgs","repos_url":"https://api.github.com/users/andrewcupper/repos","events_url":"https://api.github.com/users/andrewcupper/events{/privacy}","received_events_url":"https://api.github.com/users/andrewcupper/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-04-20T06:41:48Z","updated_at":"2015-06-18T09:50:49Z","closed_at":"2015-06-18T09:50:49Z","body":"At the moment AppSettings are read using `serilog:` as a prefix in the appsettings config section:\r\n``` xml\r\n<add key=\"serilog:using\" value=\"Serilog.Sinks.Elasticsearch\" />\r\n<add key=\"serilog:write-to:Elasticsearch.serverAddress\" value=\"http://localhost:9200\" />\r\n```\r\nIt would be useful to allow multiple sets of configuration to be read by supporting the use of custom prefixes, e.g.:\r\n``` xml\r\n<add key=\"serilog1:using\" value=\"Serilog.Sinks.Seq\" />\r\n<add key=\"serilog1:write-to:Seq.serverUrl\" value=\"http://localhost:5341/\" />\r\n<add key=\"serilog2:using\" value=\"Serilog.Sinks.Elasticsearch\" />\r\n<add key=\"serilog2:write-to:Elasticsearch.serverAddress\" value=\"http://localhost:9200\" />\r\n```\r\nwhich could then be read as follows:\r\n``` c#\r\nvar logger1 = new LoggerConfiguration()\r\n  .ReadFrom.AppSettings(\"serilog1\")\r\n  .CreateLogger();\r\nvar logger2 = new LoggerConfiguration()\r\n  .ReadFrom.AppSettings(\"serilog2\")\r\n  .CreateLogger()\r\n"},"comment":{"url":"https://api.github.com/repos/serilog/serilog/issues/comments/113095211","html_url":"https://github.com/serilog/serilog/issues/430#issuecomment-113095211","issue_url":"https://api.github.com/repos/serilog/serilog/issues/430","id":113095211,"user":{"login":"nblumhardt","id":342712,"avatar_url":"https://avatars.githubusercontent.com/u/342712?v=3","gravatar_id":"","url":"https://api.github.com/users/nblumhardt","html_url":"https://github.com/nblumhardt","followers_url":"https://api.github.com/users/nblumhardt/followers","following_url":"https://api.github.com/users/nblumhardt/following{/other_user}","gists_url":"https://api.github.com/users/nblumhardt/gists{/gist_id}","starred_url":"https://api.github.com/users/nblumhardt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nblumhardt/subscriptions","organizations_url":"https://api.github.com/users/nblumhardt/orgs","repos_url":"https://api.github.com/users/nblumhardt/repos","events_url":"https://api.github.com/users/nblumhardt/events{/privacy}","received_events_url":"https://api.github.com/users/nblumhardt/received_events","type":"User","site_admin":false},"created_at":"2015-06-18T09:50:49Z","updated_at":"2015-06-18T09:50:49Z","body":"Hi Andrew - thanks again for logging this; I think the best option currently is to copy/customize the appsettings support for your scenario (I expect somewhere along the line we may go further towards this, but for now I think the configuration system needs more \"bake time\" before we start extending it). Cheers!"}}