{"action":"created","issue":{"url":"https://api.github.com/repos/serilog/serilog/issues/583","labels_url":"https://api.github.com/repos/serilog/serilog/issues/583/labels{/name}","comments_url":"https://api.github.com/repos/serilog/serilog/issues/583/comments","events_url":"https://api.github.com/repos/serilog/serilog/issues/583/events","html_url":"https://github.com/serilog/serilog/issues/583","id":117339960,"number":583,"title":"ByIncludingOnly not working for sublogger","user":{"login":"jnus","id":2075403,"avatar_url":"https://avatars.githubusercontent.com/u/2075403?v=3","gravatar_id":"","url":"https://api.github.com/users/jnus","html_url":"https://github.com/jnus","followers_url":"https://api.github.com/users/jnus/followers","following_url":"https://api.github.com/users/jnus/following{/other_user}","gists_url":"https://api.github.com/users/jnus/gists{/gist_id}","starred_url":"https://api.github.com/users/jnus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jnus/subscriptions","organizations_url":"https://api.github.com/users/jnus/orgs","repos_url":"https://api.github.com/users/jnus/repos","events_url":"https://api.github.com/users/jnus/events{/privacy}","received_events_url":"https://api.github.com/users/jnus/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-11-17T11:58:01Z","updated_at":"2015-11-20T20:43:46Z","closed_at":null,"body":"Trying to mimic Log4Net configuration where you can set both minimum and maximum log level. Hence serilog only exposes the MinimumLevel option, I using a sublogger and configuring by using ByIncludingOnly to only log Debug messages in this particular RollingFile sink. However I cannot seem to get this working.\r\n\r\n```            \r\nvar baselogger = new LoggerConfiguration()\r\n                 .WriteTo.Logger(fileLogger => fileLogger\r\n                        .Filter.ByIncludingOnly(p => p.Level.Equals(LogEventLevel.Debug))\r\n                        .WriteTo.RollingFile(@\"c:\\log\\debug.log\",\r\n                            LogEventLevel.Debug, FileOutputFormat, null, 15000000 /*15MB*/, 10));\r\n\r\n            return baselogger.CreateLogger();\r\n```\r\n\r\nNothing is ever logged by this sublogger - RollingFile sink of course works as a root logger, including Filter.ByIncludingOnly, but not as a sublogger.\r\nAny hints on what I'm missing? Workaround for logging only certain levels to a file?"},"comment":{"url":"https://api.github.com/repos/serilog/serilog/issues/comments/158518989","html_url":"https://github.com/serilog/serilog/issues/583#issuecomment-158518989","issue_url":"https://api.github.com/repos/serilog/serilog/issues/583","id":158518989,"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-11-20T20:43:46Z","updated_at":"2015-11-20T20:43:46Z","body":"Anyone think we can/should tackle this one? I'm otherwise thinking the cost/benefit trade-off is stacked against it right now."}}