{"id":15002614,"url":"https://github.com/skimmenthal13/serilog.sinks.database","last_synced_at":"2025-12-24T21:28:54.409Z","repository":{"id":257599787,"uuid":"858764669","full_name":"Skimmenthal13/Serilog.Sinks.Database","owner":"Skimmenthal13","description":"Serilog sink that writes in one of these five databases (SqlServer, Oracle, MySql, PostgreSQL, Sqlite)","archived":false,"fork":false,"pushed_at":"2024-09-27T16:05:44.000Z","size":49,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-18T12:16:17.729Z","etag":null,"topics":["database","logging","mysql","oracle","postgresql","serilog","serilog-sink","sink","sqlite","sqlserver"],"latest_commit_sha":null,"homepage":"https://www.nuget.org/packages/Serilog.Sinks.Database","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Skimmenthal13.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-17T13:50:34.000Z","updated_at":"2024-09-27T16:05:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"c9dd9ee7-d986-4ef6-b880-e81aa43b5ff9","html_url":"https://github.com/Skimmenthal13/Serilog.Sinks.Database","commit_stats":{"total_commits":10,"total_committers":1,"mean_commits":10.0,"dds":0.0,"last_synced_commit":"aa0c497a0dfa388aaa8cb124afb2e589b484daeb"},"previous_names":["skimmenthal13/serilog.sinks.database"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Skimmenthal13%2FSerilog.Sinks.Database","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Skimmenthal13%2FSerilog.Sinks.Database/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Skimmenthal13%2FSerilog.Sinks.Database/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Skimmenthal13%2FSerilog.Sinks.Database/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Skimmenthal13","download_url":"https://codeload.github.com/Skimmenthal13/Serilog.Sinks.Database/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243146849,"owners_count":20243740,"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":["database","logging","mysql","oracle","postgresql","serilog","serilog-sink","sink","sqlite","sqlserver"],"created_at":"2024-09-24T18:51:32.226Z","updated_at":"2025-12-24T21:28:54.364Z","avatar_url":"https://github.com/Skimmenthal13.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Serilog.Sinks.Database\nSerilog sink that writes in one of these five databases :\n\n| Database   | Library                    | Example of connection string                                                                                                                                                            |\n| ---------- | -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| SqlServer  | System.Data.SqlClient      | const string sqlConnectionString = \"Data Source=NBK-437;Persist Security Info=True;Initial Catalog=test;Integrated Security=SSPI;\";                                                     |\n| Oracle     | Oracle.ManagedDataAccess   | const string oraConnectionString = \"Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=XEPDB1)));User Id=DBWUSR;Password=DBWUSR;\"; |\n| MySql      | MySql.Data                 | const string mysConnectionString = \"Server=localhost;Database=test;Uid=sa;Pwd=ASqlAdmin01;\";                                                                                            |\n| PostgreSQL | Npgsql                     | const string posConnectionString = \"Server=127.0.0.1;Port=5432;Database=test;User Id=postgres;Password=ASqlAdmin01;\";                                                                   |\n| Sqlite     | Microsoft.Data.Sqlite      | const string litConnectionString = @\"Data Source=c:\\temp\\test.db;\";                                                                                                                     |\n\n## Getting started\n\nInstall [Serilog.Sinks.Database](https://www.nuget.org/packages/Serilog.Sinks.Database) from NuGet\n\n```PowerShell\nInstall-Package Serilog.Sinks.Database\n```\n\nConfigure logger by calling WriteTo.Database\n\n```C#\nDBType dbType = DBType.MySql;\n            \nvar logger = new LoggerConfiguration()\n      .WriteTo.Database(dbType, \"Server=localhost;Database=test;Uid=sa;Pwd=ASqlAdmin01;\", \"SerLogs\",Events.LogEventLevel.Verbose,false,1)\n      .CreateLogger();\n\nlogger.Information(\"This informational message will be written to wich database you want\");\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskimmenthal13%2Fserilog.sinks.database","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskimmenthal13%2Fserilog.sinks.database","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskimmenthal13%2Fserilog.sinks.database/lists"}