{"id":17749482,"url":"https://github.com/oresoftware/json-logging","last_synced_at":"2026-01-19T10:33:44.753Z","repository":{"id":95712496,"uuid":"238593086","full_name":"ORESoftware/json-logging","owner":"ORESoftware","description":"Log JSON to stdout for important services and easy log inspection.","archived":false,"fork":false,"pushed_at":"2024-08-05T21:27:34.000Z","size":190,"stargazers_count":1,"open_issues_count":8,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-08-06T00:31:31.340Z","etag":null,"topics":["go-library","go-module","go-modules","golang","golang-library","json","logging"],"latest_commit_sha":null,"homepage":"","language":"Go","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/ORESoftware.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}},"created_at":"2020-02-06T02:39:32.000Z","updated_at":"2024-08-05T21:27:37.000Z","dependencies_parsed_at":"2023-11-22T01:58:43.291Z","dependency_job_id":"3a5b2630-e3dd-4029-b50f-23e1ad34b55b","html_url":"https://github.com/ORESoftware/json-logging","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/ORESoftware%2Fjson-logging","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ORESoftware%2Fjson-logging/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ORESoftware%2Fjson-logging/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ORESoftware%2Fjson-logging/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ORESoftware","download_url":"https://codeload.github.com/ORESoftware/json-logging/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247239906,"owners_count":20906716,"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":["go-library","go-module","go-modules","golang","golang-library","json","logging"],"created_at":"2024-10-26T11:23:30.524Z","updated_at":"2026-01-19T10:33:44.726Z","avatar_url":"https://github.com/ORESoftware.png","language":"Go","readme":"\n\n# @oresoftware/json-logging\n\n### json-logging is:\n\n\u003e\n\u003e * very high-performance\n\u003e * developer friendly\n\u003e * opinionated \n\u003e * only writes to stdout, never to stderr\n\u003e\n\n\n### json-logging accomplishes two things:\n\n1. When stdout is connected to a terminal (tty), it writes beautiful output like so:\n\n\n\n2. When stdout is not connected to a tty, then it writes optimized JSON in an array form:\n\n\nTo force the use of JSON output, you can do:\n\n```bash\nmyapp | cat\n```\n\nor set an env var:\n\n```bash\njlog_force_json=yes myapp \n```\n\n\n### Implementation details / features\n\n1. Handles pointers, structs, slices/arrays, maps, and primitives\n2. Includes facilities for easily writing raw serialized data (string, byte) to stdout (and stderr if you want).\n3. The array format is optimized for performance and also developer friendliness since it is much less verbose.\n\n\n### The array format:\n\n```\n[date, level, appname, pid, hostname, {customFields}, [...messages]]\n```\n\nCustom fields are used to filter the logs easily, for example if you want to filter the logs by request id:\n\n```\n[date, level, appname, pid, hostname, {requestId: \"\"}, [...messages]]\n```\n\nwhere requestId is a uuid for a particular request to an HTTP server.\n\n\n\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foresoftware%2Fjson-logging","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foresoftware%2Fjson-logging","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foresoftware%2Fjson-logging/lists"}