{"id":16516216,"url":"https://github.com/aphistic/gomol-console","last_synced_at":"2025-06-22T13:06:42.065Z","repository":{"id":57480359,"uuid":"63164963","full_name":"aphistic/gomol-console","owner":"aphistic","description":"A gomol logger to write to the console.","archived":false,"fork":false,"pushed_at":"2018-01-11T15:22:29.000Z","size":13,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-22T13:06:31.518Z","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-07-12T14:30:54.000Z","updated_at":"2017-01-26T20:46:09.000Z","dependencies_parsed_at":"2022-09-26T17:41:40.583Z","dependency_job_id":null,"html_url":"https://github.com/aphistic/gomol-console","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/aphistic/gomol-console","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aphistic%2Fgomol-console","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aphistic%2Fgomol-console/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aphistic%2Fgomol-console/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aphistic%2Fgomol-console/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aphistic","download_url":"https://codeload.github.com/aphistic/gomol-console/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aphistic%2Fgomol-console/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261296913,"owners_count":23137218,"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:04.684Z","updated_at":"2025-06-22T13:06:37.048Z","avatar_url":"https://github.com/aphistic.png","language":"Go","readme":"gomol-console\n============\n\n[![GoDoc](https://godoc.org/github.com/aphistic/gomol-console?status.svg)](https://godoc.org/github.com/aphistic/gomol-console)\n[![Build Status](https://img.shields.io/travis/aphistic/gomol-console.svg)](https://travis-ci.org/aphistic/gomol-console)\n[![Code Coverage](https://img.shields.io/codecov/c/github/aphistic/gomol-console.svg)](http://codecov.io/github/aphistic/gomol-console?branch=master)\n\ngomol-console is a logger for [gomol](https://github.com/aphistic/gomol) to support logging to the console.\n\nInstallation\n============\n\nThe recommended way to install is via http://gopkg.in\n\n    go get gopkg.in/aphistic/gomol-console.v0\n    ...\n    import \"gopkg.in/aphistic/gomol-console.v0\"\n\ngomol-console can also be installed the standard way as well\n\n    go get github.com/aphistic/gomol-console\n    ...\n    import \"github.com/aphistic/gomol-console\"\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 console logger to gomol and then logging a few messages:\n\n```go\npackage main\n\nimport (\n\t\"github.com/aphistic/gomol\"\n\tgc \"github.com/aphistic/gomol-console\"\n)\n\nfunc main() {\n\t// Add an io.Writer logger\n\tconsoleCfg := gc.NewConsoleLoggerConfig()\n\tconsoleLogger, _ := gc.NewConsoleLogger(consoleCfg)\n\tgomol.AddLogger(consoleLogger)\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","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faphistic%2Fgomol-console","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faphistic%2Fgomol-console","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faphistic%2Fgomol-console/lists"}