{"id":13786884,"url":"https://github.com/ilgooz/service-bluelogger","last_synced_at":"2025-03-26T12:13:35.847Z","repository":{"id":81480554,"uuid":"142131239","full_name":"ilgooz/service-bluelogger","owner":"ilgooz","description":"BlueLogger is a logger service for MESG","archived":false,"fork":false,"pushed_at":"2020-06-08T10:44:39.000Z","size":3930,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-31T13:22:25.789Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","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/ilgooz.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,"roadmap":null,"authors":null}},"created_at":"2018-07-24T08:48:58.000Z","updated_at":"2018-08-21T15:11:07.000Z","dependencies_parsed_at":"2023-10-30T08:00:24.464Z","dependency_job_id":null,"html_url":"https://github.com/ilgooz/service-bluelogger","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ilgooz%2Fservice-bluelogger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ilgooz%2Fservice-bluelogger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ilgooz%2Fservice-bluelogger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ilgooz%2Fservice-bluelogger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ilgooz","download_url":"https://codeload.github.com/ilgooz/service-bluelogger/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245650484,"owners_count":20650105,"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":[],"created_at":"2024-08-03T20:00:20.518Z","updated_at":"2025-03-26T12:13:35.830Z","avatar_url":"https://github.com/ilgooz.png","language":"Go","funding_links":[],"categories":["Logging"],"sub_categories":[],"readme":"\n# BlueLogger\n\nBlueLogger is a logger service for [MESG](https://mesg.tech).\n\n  \n## Installation\n`$ mesg-core service deploy https://github.com/ilgooz/service-bluelogger`\n\n## Tasks\nTasks of the logger service\n\n### log\nLogs input data to standard output.\n#### Input Data\n* ServiceID `(string)`\nID of the service that `Data` received from.\n* Data `(object)`\nActual log message\n\n#### Output Data\n* Success: OK `(bool)`\n* Error: Message `(string)`\n\n\n## Sample usage in your MESG Application\n\n```go\npackage main\n\nimport (\n    \"log\"\n\n    mesg \"github.com/mesg-foundation/go-application\"\n)\n\nconst (\n    discordServiceID = \"fill here with the id of the service to log it's task outputs\"\n    loggerServiceID  = \"fill here with the logger service's id\"\n)\n\ntype logRequest struct {\n    ServiceID string      `json:\"serviceID\"`\n    Data      interface{} `json:\"data\"`\n}\n\nfunc main() {\n    app, err := mesg.New()\n    if err != nil {\n        log.Fatal(err)\n    }\n\n    // 1- wait for send task's results from Discord service.\n    // 2- send the results to log service with service id of Discord.\n    _, err := app.\n        WhenResult(discordServiceID, mesg.TaskFilterOption(\"send\")).\n        Filter(func(r *mesg.Result) bool {\n            var resp interface{}\n            return r.Data(\u0026resp) == nil\n        }).\n        Map(func(r *mesg.Result) mesg.Data {\n            var resp interface{}\n            r.Data(\u0026resp)\n            return logRequest{\n                ServiceID: discordServiceID,\n                Data:      resp,\n            }\n        }).\n        Execute(loggerServiceID, \"log\")\n        \n    if err != nil {\n        log.Fatal(err)\n    }\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Filgooz%2Fservice-bluelogger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Filgooz%2Fservice-bluelogger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Filgooz%2Fservice-bluelogger/lists"}