{"id":37050591,"url":"https://github.com/pm4net/serilog-sinks-ocel","last_synced_at":"2026-01-14T05:51:41.655Z","repository":{"id":65328470,"uuid":"560829829","full_name":"pm4net/serilog-sinks-ocel","owner":"pm4net","description":"Serilog sinks that write events to Object-Centric Event Logs (OCEL)","archived":false,"fork":false,"pushed_at":"2023-10-19T11:20:35.000Z","size":97,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-08-31T00:36:36.656Z","etag":null,"topics":["dotnet","ocel","process-mining"],"latest_commit_sha":null,"homepage":"","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/pm4net.png","metadata":{"files":{"readme":"README.md","changelog":null,"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}},"created_at":"2022-11-02T11:12:09.000Z","updated_at":"2023-09-18T13:11:03.000Z","dependencies_parsed_at":"2023-04-07T09:26:29.475Z","dependency_job_id":"9bce1a57-0956-4b81-be70-885993844dc3","html_url":"https://github.com/pm4net/serilog-sinks-ocel","commit_stats":{"total_commits":34,"total_committers":2,"mean_commits":17.0,"dds":0.4117647058823529,"last_synced_commit":"cd8f3e097c64e210d48c3b04abaf62b3c3650eb1"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/pm4net/serilog-sinks-ocel","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pm4net%2Fserilog-sinks-ocel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pm4net%2Fserilog-sinks-ocel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pm4net%2Fserilog-sinks-ocel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pm4net%2Fserilog-sinks-ocel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pm4net","download_url":"https://codeload.github.com/pm4net/serilog-sinks-ocel/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pm4net%2Fserilog-sinks-ocel/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28411735,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T05:26:33.345Z","status":"ssl_error","status_checked_at":"2026-01-14T05:21:57.251Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["dotnet","ocel","process-mining"],"created_at":"2026-01-14T05:51:41.071Z","updated_at":"2026-01-14T05:51:41.647Z","avatar_url":"https://github.com/pm4net.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Serilog.Sinks.OCEL\n\n[![GitHub](https://img.shields.io/github/license/pm4net/serilog-sinks-ocel?style=flat-square)](https://github.com/pm4net/serilog-sinks-ocel/blob/master/LICENSE)\n[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/pm4net/serilog-sinks-ocel/tests.yml?label=tests\u0026style=flat-square\u0026branch=master)](https://github.com/pm4net/serilog-sinks-ocel/actions/workflows/tests.yml)\n[![Nuget (with prereleases)](https://img.shields.io/nuget/vpre/Serilog.Sinks.OCEL?label=NuGet\u0026style=flat-square)](https://www.nuget.org/packages/Serilog.Sinks.OCEL/)\n[![Nuget](https://img.shields.io/nuget/dt/Serilog.Sinks.OCEL?label=NuGet%20Downloads\u0026style=flat-square)](https://www.nuget.org/packages/Serilog.Sinks.OCEL/#versions-body-tab)\n\nSerilog sinks that write events to Object-Centric Event Logs (OCEL) [1], using the [.NET OCEL library](https://github.com/pm4net/OCEL).\n\nThere is a separate sinks for each of the supported OCEL format: `Serilog.Sinks.OCEL.Sinks.OcelJsonSink`, `Serilog.Sinks.OCEL.Sinks.OcelXmlSink`, and `Serilog.Sinks.OCEL.Sinks.OcelLiteDbSink`.\n\nRolling files are supported by configuring the log directory and file name separately. Depending on the [rolling period](https://github.com/pm4net/serilog-sinks-ocel/blob/master/Serilog.Sinks.OCEL/RollingPeriod.cs), the file name is prepended with an identifier.\n\nSample configuration:\n\n```csharp\nLog.Logger = new LoggerConfiguration()\n    .MinimumLevel.Information()\n    .WriteTo.OcelLiteDbSink(new LiteDbSinkOptions(string.Empty, \"log.db\", RollingPeriod.Never))\n    .CreateLogger();\n```\n\nOr via `appsettings.json` (using [Serilog.Settings.Configuration](https://github.com/serilog/serilog-settings-configuration)):\n\n```json\n\"Serilog\": {\n    \"MinimumLevel\": {\n      \"Default\": \"Information\"\n    },\n    \"WriteTo\": [\n      {\n        \"Name\": \"Console\"\n      },\n      {\n        \"Name\": \"OcelJsonSink\",\n        \"Args\": {\n          \"directory\": \"\",\n          \"fileName\": \"log.jsonocel\",\n          \"rollingPeriod\": \"Month\",\n          \"formatting\": \"Indented\",\n          \"prefix\": \"myprefix_\"\n        }\n      }\n    ]\n  }\n```\n\n# Supported formats\n\nThe OCEL standard is defined for both JSON and XML. Both include a validation schema that is used by the library to validate input.\n\nAn additional useful format is to store OCEL data in document databases such as MongoDB [2]. A very good alternative for .NET is [LiteDB](https://www.litedb.org/), which is an embedded NoSQL database that is similar to MongoDB. It allows writing to files directly and does not require a database server to use. Support for MongoDB will be evaluated in the future.\n\n| Format        | Status        |\n| ------------- |:-------------:|\n| JSON          | Implemented   |\n| XML           | Implemented   |\n| LiteDB        | Implemented   |\n| MongoDB       | TBD           |\n\n# Performance\n\nJSON and XML files cannot simply be appended like a text file or a database table. The entire file has to be rewritten each time, which is expensive. If you are going to use either the JSON or XML sink, make sure to use short rolling periods to avoid log files with more than a few thousand events at a time. It is generally **recommended to use the LiteDb sink for all logging** due to better performance, even though LiteDb files tend to be larger in size overall. The [OCEL library](https://github.com/pm4net/OCEL) can be used to later convert between formats or even merge multiple files together.\n\n# References\n\n[1] Farhang, A., Park, G. G., Berti, A., \u0026 Aalst, W. Van Der. (2020). OCEL Standard. http://ocel-standard.org/\n\n[2] Berti, A., Ghahfarokhi, A. F., Park, G., \u0026 van der Aalst, W. M. P. (2021). A Scalable Database for the Storage of Object-Centric Event Logs. CEUR Workshop Proceedings, 3098, 19–20. https://arxiv.org/abs/2202.05639.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpm4net%2Fserilog-sinks-ocel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpm4net%2Fserilog-sinks-ocel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpm4net%2Fserilog-sinks-ocel/lists"}