{"id":17861200,"url":"https://github.com/jonathanstowe/lumberjack-dispatcher-eventsource","last_synced_at":"2025-07-28T01:38:19.296Z","repository":{"id":66980424,"uuid":"336535544","full_name":"jonathanstowe/Lumberjack-Dispatcher-EventSource","owner":"jonathanstowe","description":"A  Lumberjack Dispatcher that emits the log messages as server sent events","archived":false,"fork":false,"pushed_at":"2022-08-07T08:47:47.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2023-04-22T17:06:59.757Z","etag":null,"topics":["dispatcher","eventsource","logging","raku"],"latest_commit_sha":null,"homepage":"","language":"Raku","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"artistic-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jonathanstowe.png","metadata":{"files":{"readme":"README.md","changelog":"Changes","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-02-06T12:44:10.000Z","updated_at":"2022-08-07T08:47:50.000Z","dependencies_parsed_at":"2023-05-16T10:00:18.526Z","dependency_job_id":null,"html_url":"https://github.com/jonathanstowe/Lumberjack-Dispatcher-EventSource","commit_stats":null,"previous_names":[],"tags_count":4,"template":null,"template_full_name":null,"purl":"pkg:github/jonathanstowe/Lumberjack-Dispatcher-EventSource","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanstowe%2FLumberjack-Dispatcher-EventSource","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanstowe%2FLumberjack-Dispatcher-EventSource/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanstowe%2FLumberjack-Dispatcher-EventSource/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanstowe%2FLumberjack-Dispatcher-EventSource/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonathanstowe","download_url":"https://codeload.github.com/jonathanstowe/Lumberjack-Dispatcher-EventSource/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanstowe%2FLumberjack-Dispatcher-EventSource/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267451221,"owners_count":24089298,"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-27T02:00:11.917Z","response_time":82,"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":["dispatcher","eventsource","logging","raku"],"created_at":"2024-10-28T08:43:19.872Z","updated_at":"2025-07-28T01:38:19.269Z","avatar_url":"https://github.com/jonathanstowe.png","language":"Raku","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lumberjack::Dispatcher::EventSource\n\nA Dispatcher for Lumberjack that emits the log messages as server sent events\n\n![Build Status](https://github.com/jonathanstowe/Lumberjack-Dispatcher-EventSource/workflows/CI/badge.svg)\n\n## Synopsis\n\n    use Lumberjack;\n    use Lumberjack::Dispatcher::EventSource;\n    use Cro::HTTP::Router;\n    use Cro::HTTP::Server;\n\n    my $dispatcher = Lumberjack::Dispatcher::EventSource.new\n\n    Lumberjack.dispatchers.append: $dispatcher;\n\n\n    my $app = route {\n        get -\u003e {\n            content 'text/event-stream', $dispatcher.Supply;\n        }\n    };\n\n    my Cro::Service $log = Cro::HTTP::Server.new(:host\u003clocalhost\u003e, :port\u003c7798\u003e, application =\u003e $app);\n\n    $log.start;\n\n    react whenever signal(SIGINT) { $log.stop; exit; }\n\nThere is a slightly more comprehensive example in the [examples](examples) directory.\n\n## Description\n\nThis is a [Lumberjack::Dispatcher](https://github.com/jonathanstowe/Lumberjack/blob/master/Documentation.md#lumberjackdispatcher) implementation that emits the log messages as JSON (as formatted by `Lumberjack::Message::JSON`,) on a supply in the format of [Server Sent Events](https://www.w3.org/TR/eventsource/). The `Supply` can be passed as a response to a web toolkit that supports chunked encoding such as `Cro` or `Crust`.\n\nThis may be useful if you want to expose your logging to the web or to some log archiver or something.\n\nThe exact format of the JSON emitted is documented by [Lumberjack::Message::JSON](https://github.com/jonathanstowe/Lumberjack-Message-JSON)\n\n## Installation\n\nAssuming you have a working Rakudo installation then you can install this with *zef* :\n\n    zef install Lumberjack::Dispatcher::EventSource\n\n## Support\n\nThis is a very simple module, really just the composition of some existing things, so it's most likely that if there are bugs they are in `EventSource::Server` or `Lumberjack::Message::JSON`\nHowever please feel free to report any issues/suggestions/whatever at [Github](https://github.com/jonathanstowe/Lumberjack-Dispatcher-EventSource/issues).\n\n## Licence and Copyright\n\nThis is free software, please see the [LICENCE](LICENCE) file in the distribution for more details.\n\n© Jonathan Stowe 2021-\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonathanstowe%2Flumberjack-dispatcher-eventsource","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonathanstowe%2Flumberjack-dispatcher-eventsource","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonathanstowe%2Flumberjack-dispatcher-eventsource/lists"}