{"id":18419785,"url":"https://github.com/telia-oss/rootle","last_synced_at":"2026-04-02T13:30:04.828Z","repository":{"id":56860801,"uuid":"522914828","full_name":"telia-oss/rootle","owner":"telia-oss","description":"Cross-language structured log library","archived":false,"fork":false,"pushed_at":"2026-03-24T07:45:11.000Z","size":191,"stargazers_count":2,"open_issues_count":6,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2026-03-25T09:27:25.239Z","etag":null,"topics":["golang","grpc","grpc-interceptor","kotlin","logging","structured-logging","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/telia-oss.png","metadata":{"files":{"readme":"README.md","changelog":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-08-09T11:10:08.000Z","updated_at":"2026-03-24T07:44:16.000Z","dependencies_parsed_at":"2024-06-20T22:07:58.385Z","dependency_job_id":null,"html_url":"https://github.com/telia-oss/rootle","commit_stats":{"total_commits":52,"total_committers":2,"mean_commits":26.0,"dds":"0.019230769230769273","last_synced_commit":"63144c2c190796a90a3638deda6936ddc57bf4c4"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/telia-oss/rootle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/telia-oss%2Frootle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/telia-oss%2Frootle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/telia-oss%2Frootle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/telia-oss%2Frootle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/telia-oss","download_url":"https://codeload.github.com/telia-oss/rootle/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/telia-oss%2Frootle/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31307114,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T12:59:32.332Z","status":"ssl_error","status_checked_at":"2026-04-02T12:54:48.875Z","response_time":89,"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":["golang","grpc","grpc-interceptor","kotlin","logging","structured-logging","typescript"],"created_at":"2024-11-06T04:18:22.484Z","updated_at":"2026-04-02T13:30:04.811Z","avatar_url":"https://github.com/telia-oss.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/telia-oss/rootle/blob/main/media/logo.png?raw=true\" alt=\"Rootle\"/\u003e\n\u003c/p\u003e\n\n\nCross language structured log APIs and, [error log gRPC client interceptor](./interceptor/README.md).\n\n## Methods\n\n| Name          | Parameters |\n| ------------- | ------------- |\n| Info          |(message)  |\n| Warn          | (message)  |\n| Error         | (message, event, downstream, stacktrace, code)  |\n\n## Transports\n\nFile transport, allows writting logs to file\n\n| Language          | status |\n| ------------- | ------------- |\n| [TypeScript](./typescript/README.md)          |:white_check_mark: |\n| Go          | Planned  |\n| Kotlin         | Planned |\n\n## Log structure\n\n| Field         | Type          | Required\n| ------------- | ------------- | ------------- |\n| id            | string        |Yes            |\n| application   | string        |Yes            |\n| time          | string        |Yes            |\n| message       | string        |Yes            |\n| level         | string        |Yes            |\n| event         | string        |No             |\n| downstream    | Downstream    |No             |\n| stacktrace    | string        |No             |\n| code \"exit code\"  | int       |No             |\n\n###  Downstream structure\n\n| Field         | Type          | Required\n| ------------- | ------------- | ------------- |\n| http          | Http          |No             |\n| grpc          | Grpc          |No             |\n\n####  Http structure\n\n| Field         | Type          | Required\n| ------------- | ------------- | ------------- |\n| method        | string        |No             |\n| statusCode    | HttpStatusCode(enum) |No      |\n| url           | string        |No             |\n| useragent     | string        |No             |\n| referer       | string        |No             |\n| payload       | string        |No             |\n\n####  Grpc structure\n\n| Field         | Type          | Required\n| ------------- | ------------- | ------------- |\n| procedure     | string        |No             |\n| code          | GrpcCodes(enum) |No           |\n| service       | string        |No             |\n| useragent     | string        |No             |\n| referer       | string        |No             |\n| payload       | string        |No             |\n\n## Usage\n\n[Examples](https://github.com/telia-oss/rootle/tree/master/example)\n\n- Go\n```\n\nimport (\n\trootle \"github.com/telia-oss/rootle\"\n)\n\n\tctx := context.Background()\n\nlogger := rootle.New(ctx, *rootle.NewConfig().WithID(\"ac12Cd-Aevd-12Grx-235f4\").WithApplication(\"invoice-lambda\"))\n\nlogger.Info(\"Hello World\")\nlogger.Warn(\"Hello World\")\n\ndata := map[string]interface{}{\n  \"foo\": \"bar\",\n}\n\njson, _ := json.Marshal(data)\n\nlogger.Error(\"Hello World\", rootle.String(string(json)), \u0026rootle.Downstream{\n  Http: \u0026rootle.Http{\n    Method:     \"GET\",\n    StatusCode: rootle.INTERNAL_SERVER_ERROR,\n    Url:        \"http://localhost:8080/invoice/123\",\n    Useragent:  \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36\",\n    Referer:    \"http://localhost:8080/\",\n    Payload:    string(json),\n  },\n  Grpc: \u0026rootle.Grpc{\n    Procedure: \"GetInvoice\",\n    Code:      rootle.INTERNAL,\n    Service:   \"invoice\",\n    Useragent: \"\t/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36\",\n    Referer: \"http://localhost:8080/\",\n    Payload: string(json),\n  },\n}, rootle.String(\"billing/user\"), rootle.Int(0))\n```\n\n- Kotlin\n```\nval logger = Rootle(\"ac12Cd-Aevd-12Grx-235f4\", \"Billing-lambda\")\nlogger.info(\"Hello world\")\nlogger.warn(\"Hello world\")\n\nval jsonObject = JsonObject()\njsonObject.addProperty(\"foo\", \"bar\")\n\n\nlogger.error(\"Error message\", jsonObject.toString(), logger.Downstream(logger.Http(\"GET\", StatusCode.InternalServerError.code, \"http://localhost:8080/invoice/123\",\n    \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36\",\n    \"http://localhost:8080/\",  jsonObject.toString()),\n    logger.Grpc(\"GetInvoice\", GrpcCodes.internalError.code, \"invoice\",\n        \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36\",\n        \"http://localhost:8080/\", jsonObject.toString())), \"billing/user\", 0);\n```\n\n- [TypeScript](./typescript/README.md)\n## Output example\n```\n- Info: {\"id\":\"ac12Cd-Aevd-12Grx-235f4\",\"application\":\"invoice-lambda\",\"time\":\"2006-01-02T15:04:05.999999999Z\",\"message\":\"Hello World\",\"level\":\"INFO\"}\n\n- Warn: {\"id\":\"ac12Cd-Aevd-12Grx-235f4\",\"application\":\"invoice-lambda\",\"time\":\"2006-01-02T15:04:05.999999999Z\",\"message\":\"Hello World\",\"level\":\"WARN\"}\n\n- Error: \n{\n   \"id\":\"ac12Cd-Aevd-12Grx-235f4\",\n   \"application\":\"invoice-lambda\",\n   \"time\":\"2006-01-02T15:04:05.999999999Z\",\n   \"message\":\"Hello World\",\n   \"level\":\"ERROR\",\n   \"event\":\"{\\\"foo\\\":\\\"bar\\\"}\",\n   \"downstream\":{\n      \"grpc\":{\n         \"procedure\":\"GetInvoice\",\n         \"code\":13,\n         \"service\":\"invoice\",\n         \"useragent\":\"\\t/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36\",\n         \"referer\":\"http://localhost:8080/\",\n         \"payload\":\"{\\\"foo\\\":\\\"bar\\\"}\"\n      },\n      \"http\":{\n         \"method\":\"GET\",\n         \"status_code\":500,\n         \"url\":\"http://localhost:8080/invoice/123\",\n         \"useragent\":\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36\",\n         \"referer\":\"http://localhost:8080/\",\n         \"payload\":\"{\\\"foo\\\":\\\"bar\\\"}\"\n      }\n   },\n   \"stackTrace\":\"billing/user\",\n   \"code\":0\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftelia-oss%2Frootle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftelia-oss%2Frootle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftelia-oss%2Frootle/lists"}