{"id":22928066,"url":"https://github.com/ttakahari/fluentdclient.sharp","last_synced_at":"2025-07-27T01:08:17.878Z","repository":{"id":60773905,"uuid":"96563703","full_name":"ttakahari/FluentdClient.Sharp","owner":"ttakahari","description":"Fluentd client for C# and VB.NET.","archived":false,"fork":false,"pushed_at":"2020-02-12T13:37:34.000Z","size":37,"stargazers_count":4,"open_issues_count":2,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-14T12:51:52.953Z","etag":null,"topics":["csharp","fluentd","messagepack","msgpack"],"latest_commit_sha":null,"homepage":"","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/ttakahari.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}},"created_at":"2017-07-07T18:05:22.000Z","updated_at":"2019-10-07T18:40:19.000Z","dependencies_parsed_at":"2022-10-04T15:37:49.924Z","dependency_job_id":null,"html_url":"https://github.com/ttakahari/FluentdClient.Sharp","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/ttakahari/FluentdClient.Sharp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ttakahari%2FFluentdClient.Sharp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ttakahari%2FFluentdClient.Sharp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ttakahari%2FFluentdClient.Sharp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ttakahari%2FFluentdClient.Sharp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ttakahari","download_url":"https://codeload.github.com/ttakahari/FluentdClient.Sharp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ttakahari%2FFluentdClient.Sharp/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267278912,"owners_count":24063279,"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","status":"online","status_checked_at":"2025-07-26T02:00:08.937Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["csharp","fluentd","messagepack","msgpack"],"created_at":"2024-12-14T09:17:16.121Z","updated_at":"2025-07-27T01:08:17.858Z","avatar_url":"https://github.com/ttakahari.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FluentdClient.Sharp\n\nFluentd client for C# and VB.NET that is thin and simple.\n\nCurrently, it supports TCP connection only.\n\n[![AppVeyor](https://img.shields.io/appveyor/ci/gruntjs/grunt.svg?style=plastic)](https://ci.appveyor.com/project/ttakahari/FluentdClient-Sharp)\n[![NuGet](https://img.shields.io/nuget/v/FluentdClient.Sharp.svg?style=plastic)](https://www.nuget.org/packages/FluentdClient.Sharp/)\n\n## Install\n\nfrom NuGet - [FluentdClient.Sharp](https://www.nuget.org/packages/FluentdClient.Sharp/)\n\n```ps1\nPM \u003e Install-Package FluentdClient.Sharp\n```\n\n## How to use\n\nAt first, you must create an instance of ```FluentdClient```, with giving the informations of fluentd server(host and port) and the serializer(messagepack formatted), or the instance of ```FluentdSetting``` including those.\n\nNext, you can connect to fluetnd server with calling ```ConnectAsync``` method.\n\nFinally, you can send a message to fluentd server to call ```SendAsync``` method.\n(If you don't call ```ConnectAsync``` method before, ```FluetndClient``` calls it automatically.)\n\n```csharp\nusing (var client = new FluentdClient(\"172.0.0.1\", 24224, new MsgPackSerializer()))\n{\n    await client.ConnectAsync();\n\n    // send a simple message.\n    await client.SendAsync(\"tag.simple\", \"hello fluentd.\");\n\n    // send a structured message.\n    await client.SendAsync(\"tag.structured\", new { MachineName = Environment.MachineName });\n}\n```\n\nIf you use ```FluentdSetting``` when you create the instance of ```FluentdClient```, you can set the timeout and how to handle exceptions when sending messages to fluentd server.\n\n```csharp\nvar setting = new FluentdSetting(\"172.0.0.1\", 24224, new MessagePackSerializer());\n\n// set timeout(ms)\nsetting.Timeout = 5000;\n// set how to handle exception\nsetting.ExceptionHandler = new Action\u003cException\u003e(ex =\u003e Console.WriteLine(ex));\n\nusing (var client = new FluentdClient(setting))\n{\n    // …\n}\n```\n\n## Serializers\n\nYou can choice the serialization libraries, MsgPack-Cli or MessagePack for C#.\n\n* [MsgPack-Cli](https://www.nuget.org/packages/MsgPack.Cli/) - [Github](https://github.com/msgpack/msgpack-cli)\n* [MessagePack for C#](https://www.nuget.org/packages/MessagePack/) - [Github](https://github.com/neuecc/MessagePack-CSharp)\n\nMsgPack-Cli is the standard MessagePack library for .NET, that is included in [msgpack Github repository](https://github.com/msgpack).\n\nMessagePack for C# is the extreamly fast MessagePack library for .NET, and faster than other binary / JSON format serializers.\n\nYou can get implemented libraries from NuGet.\n\n* [FluentdClient.Sharp.MsgPack](https://www.nuget.org/packages/FluentdClient.Sharp.MsgPack/) (Using MsgPack-Cli inner.)\n* [FluentdClient.Sharp.MessagePack](https://www.nuget.org/packages/FluentdClient.Sharp.MessagePack/) (Using MessagePack for C# inner.)\n\n```ps1\nPM \u003e FluentdClient.Sharp.MsgPack\nPM \u003e FluentdClient.Sharp.MessagePack\n```\n\nBoth can be injected the custom serialization setting when creating instances.\n\n```MsgPackSerializer```(implementation of MsgPack-Cli) recieves a instance of ```SerializationContext```. You can see about ```SerializationContext``` [here](https://github.com/msgpack/msgpack-cli/blob/master/samples/Samples/Sample03_SerializationContextAndOptions.cs).\n\nIf you don't give a instance of ```SerializationContext```, ```SerializationContext.Default``` is given.\n\n```csharp\nvar context = new SerializationContext();\n\nvar serializer = new MsgPackSerializer(context);\n```\n\n```MessagePackSerializer```(implementation of MessagePack for C#) recieves a instance of ```IMessagePackFormatterResolver```. You can see about ```IMessagePackFormatterResolver``` [here](https://github.com/neuecc/MessagePack-CSharp#extension-pointiformatterresolver).\n\nIf you don't give a instance of ```IMessagePackFormatterResolver```, ```TypelessContractlessStandardResolver.Instance``` is given.\n\n```MultipleFormatterResolver``` is used inner actually because it includes ```PayloadFormatterResolver``` that resolves the format of ```Payload```(message class)  and ```UnixTimestampFormatterResolver``` that resolves the format of ```DateTime``` and ```DateTimeOffset``` as UnixTimestamp.\n\n```csharp\nvar serializer = new MessagePackSerializer(StandardResolver.Instance);\n```\n\n## Lisence\n\nunder [MIT Lisence](https://opensource.org/licenses/MIT)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fttakahari%2Ffluentdclient.sharp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fttakahari%2Ffluentdclient.sharp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fttakahari%2Ffluentdclient.sharp/lists"}