{"id":17861105,"url":"https://github.com/jonathanstowe/lumberjack-application","last_synced_at":"2025-04-02T20:47:19.759Z","repository":{"id":54336427,"uuid":"55181730","full_name":"jonathanstowe/Lumberjack-Application","owner":"jonathanstowe","description":"A web facility for the Lumberjack logging framework","archived":false,"fork":false,"pushed_at":"2022-08-07T08:48:17.000Z","size":60,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-07-30T20:11:36.566Z","etag":null,"topics":["application","logging","lumberjack","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}},"created_at":"2016-03-31T20:43:50.000Z","updated_at":"2022-08-07T08:48:21.000Z","dependencies_parsed_at":"2022-08-13T12:30:29.907Z","dependency_job_id":null,"html_url":"https://github.com/jonathanstowe/Lumberjack-Application","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanstowe%2FLumberjack-Application","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanstowe%2FLumberjack-Application/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanstowe%2FLumberjack-Application/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanstowe%2FLumberjack-Application/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonathanstowe","download_url":"https://codeload.github.com/jonathanstowe/Lumberjack-Application/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246892796,"owners_count":20850846,"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":["application","logging","lumberjack","raku"],"created_at":"2024-10-28T08:42:55.227Z","updated_at":"2025-04-02T20:47:19.590Z","avatar_url":"https://github.com/jonathanstowe.png","language":"Raku","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lumberjack::Application\n\nA web facility for the Lumberjack logging framework\n\n![Build Status](https://github.com/jonathanstowe/Lumberjack-Application/workflows/CI/badge.svg)\n\n\n## Synopsis\n\n```\n\t# In some shell start the lumberjack standalone application\n\t# on port 8898 and mirroring log messages to the console\n\n\tlumberjack-application --port=8898 --console\n```\nMeanwhile in some other application:\n\n```raku\n\n\tuse Lumberjack;\n\tuse Lumberjack::Dispatcher::Proxy;\n\n\t# Add the proxy dispatcher\n\tLumberjack.dispatchers.append: Lumberjack::Dispatcher::Proxy.new(url =\u003e 'http://localhost:8898/log');\n\n\t# Now all logging messages will be sent to the server application as well\n\t# as any other dispatchers that may be configured. The logs will be displayed\n\t# at a Websocket application that you can point your browser at.\n\n```\nOr you can arrange components as you see fit:\n```raku\n\n# This is almost  identical to what Lumberjack::Application does\nuse Lumberjack;\nuse Lumberjack::Dispatcher::Supply;\nuse Lumberjack::Application::PSGI;\nuse Lumberjack::Application::WebSocket;\nuse Lumberjack::Application::Index;\n\nuse Crust::Builder;\n\n# The supply dispatcher is used to transfer the messages\n# between the lumberjack dispatch mechanism and the\n# connected websocket clients.\nmy $supply  = Lumberjack::Dispatcher::Supply.new;\nLumberjack.dispatchers.append: $supply;\n\n# The application classes are PSGI applications in their own right\nmy \u0026ws-app  = Lumberjack::Application::WebSocket.new(supply =\u003e $supply.Supply);\nmy \u0026log-app = Lumberjack::Application::PSGI.new;\nmy \u0026ind-app = Lumberjack::Application::Index.new(ws-url =\u003e 'socket');\n\n# Use Crust::Builder to map the applications to locations on the server\n# you can of course any other mechanism that you choose.\nmy \u0026app = builder {\n\tmount '/socket', \u0026ws-app;\n   mount '/log', \u0026log-app;\n   mount '/', \u0026ind-app;\n};\n\n# Then pass \u0026app to your P6SGI container.\n```\n\n## Description\n\nThis is actually more a collection of related\nmodules than a single module. It comprises a\n[Lumberjack](https://github.com/jonathanstowe/Lumberjack) dispatcher\nthat sends the logging messages encoded as JSON to a web server,\nA [P6SGI](https://github.com/zostay/P6SGI) application module that\nhandles the JSON messages, deserialising them back to the appropriate\nobjects and re-transmitting them to the local Lumberjack object, and a\nWebsocket app module that will re-transmit the messages as JSON to one\nor more connected websockets.  There are one or two convenience helpers\nto tie all this together.\n\nThese components together can be combined in various ways to make for\nexample, a log aggregator for a larger system, a web log monitoring tool,\nor simply perform logging to a service which is not on the local machine.\n\nThis should probably be considered more as a proof of concept, experiment\nor demonstration than a polished application.  Please feel free to take\nthe parts you need and do what you want with them.\n\n## Installation\n\nAssuming you have a working installation of Rakudo with \"zef\" then you can simply do:\n\n\tzef install Lumberjack::Application\n\nOr if you have a local copy of this distribution:\n\n\tzef install .\n\nThough I haven't tested it I can see no reason why this shouldn't work\nequally well with some similarly capable package manager that\nmay come along in the future.\n\n## Support\n\nThis is quite experimental and depends on things that are themselves\nprobably fairly experimental, but it it works and I hope you find it\nuseful in some way, that said I'll be interested in enhancements,\nfixes and suggestions at [github](https://github.com/jonathanstowe/Lumberjack-Application/issues)\n\n## Licence and Copyright\n\nThis free software, please see the [LICENCE](LICENCE) file in the distribution\ndirectory.\n\n© Jonathan Stowe, 2016 - 2021\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonathanstowe%2Flumberjack-application","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonathanstowe%2Flumberjack-application","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonathanstowe%2Flumberjack-application/lists"}