{"id":16516231,"url":"https://github.com/aphistic/gomol-json","last_synced_at":"2025-06-16T11:33:15.791Z","repository":{"id":57480379,"uuid":"65390768","full_name":"aphistic/gomol-json","owner":"aphistic","description":"A gomol logger to write JSON over TCP or UDP.","archived":false,"fork":false,"pushed_at":"2018-07-16T16:03:25.000Z","size":31,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-04T21:24:06.544Z","etag":null,"topics":["gomol"],"latest_commit_sha":null,"homepage":null,"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/aphistic.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}},"created_at":"2016-08-10T14:47:41.000Z","updated_at":"2018-07-15T03:26:31.000Z","dependencies_parsed_at":"2022-09-26T17:41:40.465Z","dependency_job_id":null,"html_url":"https://github.com/aphistic/gomol-json","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/aphistic/gomol-json","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aphistic%2Fgomol-json","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aphistic%2Fgomol-json/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aphistic%2Fgomol-json/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aphistic%2Fgomol-json/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aphistic","download_url":"https://codeload.github.com/aphistic/gomol-json/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aphistic%2Fgomol-json/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260150750,"owners_count":22966376,"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":["gomol"],"created_at":"2024-10-11T16:20:11.077Z","updated_at":"2025-06-16T11:33:15.749Z","avatar_url":"https://github.com/aphistic.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"gomol-json\n============\n\n[![GoDoc](https://godoc.org/github.com/aphistic/gomol-json?status.svg)](https://godoc.org/github.com/aphistic/gomol-json)\n[![Build Status](https://img.shields.io/travis/aphistic/gomol-json.svg)](https://travis-ci.org/aphistic/gomol-json)\n[![Code Coverage](https://img.shields.io/codecov/c/github/aphistic/gomol-json.svg)](http://codecov.io/github/aphistic/gomol-json?branch=master)\n\ngomol-json is a logger for [gomol](https://github.com/aphistic/gomol) to support logging JSON over a network.\n\nInstallation\n============\n\nTo install gomol-json, simply `go get` it and import it into your project:\n\n    go get github.com/aphistic/gomol-json\n    ...\n    import \"github.com/aphistic/gomol-json\"\n\nExamples\n========\n\nFor brevity a lot of error checking has been omitted, be sure you do your checks!\n\nThis is a super basic example of adding a JSON logger to gomol and then logging a few messages:\n\n```go\npackage main\n\nimport (\n\t\"github.com/aphistic/gomol\"\n)\n\n// Create a new JSON logger, add it to gomol and log a few messages\nfunc Example() {\n\t// Add a JSON Logger\n\tjsonCfg := NewJSONLoggerConfig(\"tcp://10.10.10.10:1234\")\n\tjsonLogger, _ := NewJSONLogger(jsonCfg)\n\tgomol.AddLogger(jsonLogger)\n\n\t// Set some global attrs that will be added to all\n\t// messages automatically\n\tgomol.SetAttr(\"facility\", \"gomol.example\")\n\tgomol.SetAttr(\"another_attr\", 1234)\n\n\t// Initialize the loggers\n\tgomol.InitLoggers()\n\tdefer gomol.ShutdownLoggers()\n\n\t// Log some debug messages with message-level attrs\n\t// that will be sent only with that message\n\tfor idx := 1; idx \u003c= 10; idx++ {\n\t\tgomol.Dbgm(\n\t\t\tgomol.NewAttrs().\n\t\t\t\tSetAttr(\"msg_attr1\", 4321),\n\t\t\t\"Test message %v\", idx)\n\t}\n}\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faphistic%2Fgomol-json","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faphistic%2Fgomol-json","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faphistic%2Fgomol-json/lists"}