{"action":"closed","issue":{"url":"https://api.github.com/repos/serilog/serilog-sinks-mssqlserver/issues/58","repository_url":"https://api.github.com/repos/serilog/serilog-sinks-mssqlserver","labels_url":"https://api.github.com/repos/serilog/serilog-sinks-mssqlserver/issues/58/labels{/name}","comments_url":"https://api.github.com/repos/serilog/serilog-sinks-mssqlserver/issues/58/comments","events_url":"https://api.github.com/repos/serilog/serilog-sinks-mssqlserver/issues/58/events","html_url":"https://github.com/serilog/serilog-sinks-mssqlserver/issues/58","id":185931229,"number":58,"title":"Writing Information to SQL table","user":{"login":"vvucetic","id":1523657,"avatar_url":"https://avatars.githubusercontent.com/u/1523657?v=3","gravatar_id":"","url":"https://api.github.com/users/vvucetic","html_url":"https://github.com/vvucetic","followers_url":"https://api.github.com/users/vvucetic/followers","following_url":"https://api.github.com/users/vvucetic/following{/other_user}","gists_url":"https://api.github.com/users/vvucetic/gists{/gist_id}","starred_url":"https://api.github.com/users/vvucetic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vvucetic/subscriptions","organizations_url":"https://api.github.com/users/vvucetic/orgs","repos_url":"https://api.github.com/users/vvucetic/repos","events_url":"https://api.github.com/users/vvucetic/events{/privacy}","received_events_url":"https://api.github.com/users/vvucetic/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-10-28T14:04:09Z","updated_at":"2016-10-28T14:10:35Z","closed_at":"2016-10-28T14:10:35Z","body":"Hi,\r\n\r\nI have following code:\r\n\r\n```\r\nclass Program\r\n    {\r\n        static void Main(string[] args)\r\n        {\r\n        \r\n            var connectionString = \"conn\";\r\n            var tableName = \"Logs\";\r\n            var columnOptions = new ColumnOptions();  // optional\r\n\r\n            //Serilog.Debugging.SelfLog.Enable(Console.Error);\r\n\r\n            var log = new LoggerConfiguration()\r\n                .WriteTo.LiterateConsole()\r\n                .MinimumLevel.Debug()\r\n                .WriteTo.MSSqlServer(connectionString: connectionString, tableName: tableName, columnOptions: columnOptions, restrictedToMinimumLevel: Serilog.Events.LogEventLevel.Verbose)\r\n                .WriteTo.RollingFile(\"log-{Date}.txt\")\r\n                .CreateLogger();\r\n            \r\n            log.Information(\"Hello, Serilog!\");\r\n            var position = new { Latitude = 25, Longitude = 134 };\r\n            var elapsedMs = 34;\r\n\r\n            log.Information(\"Processed {@Position} in {Elapsed} ms.\", position, elapsedMs);\r\n            for (int i = 0; i < 100; i++)\r\n            {\r\n                log.Error(\"error!\");\r\n\r\n            }\r\n            //log.Verbose(\"Verbose test\");\r\n            //log.Verbose(\"test\");\r\n            //log.Information(log.IsEnabled(Serilog.Events.LogEventLevel.Verbose).ToString());\r\n            System.Threading.Thread.Sleep(1000);\r\n        }\r\n    }\r\n```\r\nConsole and File sink have all logs while SQL table contains only first log `\"Hello Serilog\"` without other logs. If I comment out that line, all other logs are written. Looks like like there is an issue with `log.Information(\"Hello, Serilog!\");` when writing to MSSQL.\r\n\r\nI'm using latest version of all components taken from NuGet. Console App, .NET 4.5.1.\r\n"}}
{"actor":{"display_login":"vvucetic"}}