{"id":13670121,"url":"https://github.com/guumaster/logsymbols","last_synced_at":"2025-03-01T10:31:23.736Z","repository":{"id":67988922,"uuid":"257024974","full_name":"guumaster/logsymbols","owner":"guumaster","description":"golang package with simple log symbols","archived":false,"fork":false,"pushed_at":"2020-07-08T08:26:16.000Z","size":52,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-12T12:27:27.176Z","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/guumaster.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2020-04-19T14:47:32.000Z","updated_at":"2023-04-05T17:00:40.000Z","dependencies_parsed_at":"2023-02-23T09:16:07.583Z","dependency_job_id":null,"html_url":"https://github.com/guumaster/logsymbols","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guumaster%2Flogsymbols","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guumaster%2Flogsymbols/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guumaster%2Flogsymbols/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guumaster%2Flogsymbols/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/guumaster","download_url":"https://codeload.github.com/guumaster/logsymbols/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":220041240,"owners_count":16587277,"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-02T09:00:33.118Z","updated_at":"2024-10-17T11:01:29.414Z","avatar_url":"https://github.com/guumaster.png","language":"Go","funding_links":["https://www.paypal.me/guumaster","https://ko-fi.com/guumaster"],"categories":["Go"],"sub_categories":[],"readme":"[![Tests][tests-badge]][tests-link]\n[![Go Report Card][report-badge]][report-link]\n[![Go Reference][reference-badge]][reference-link]\n[![License][license-badge]][license-link]\n[![Coverage][coverage-badge]][coverage-link]\n\n# log symbols\n\n\u003e Colored symbols for various log levels\nIncludes fallbacks for Windows CMD which only supports a [limited character set](https://en.wikipedia.org/wiki/Code_page_437).\n\n\n### Linux/Mac\n![logsymbols on Linux](docs/screenshot.png)\n\n### Windows\n\n![logsymbols on Windows](docs/screenshot_windows.png)\n\n\n## Install\n\n```\n$ go get github.com/guumaster/logsymbols\n```\n\n## Usage\n\n### Basic example\n```go\n\npackage main\n\nimport (\n  \"fmt\"\n  \"github.com/guumaster/logsymbols\"\n)\n\nfunc main() {\n    fmt.Println(logsymbols.Success, \"Finished successfully!\")\n    fmt.Println(logsymbols.Error, \"Something broke\")\n\n    // On good OSes:  ✔ Finished successfully!\n    //                ✖ Something broke\n\n    // On Windows:    √ Finished successfully!\n    //                × Something broke\n}\n\n```\n\n### Forcing colors\n\n`logsymbols` will autodetect if its not in TTY mode and remove all colors. You can force color output with this example:\n\n```go\n\n  \tlogsymbols.ForceColors()\n    fmt.Println(logsymbols.Success, \"Finished successfully!\")\n\n    // Terminal Output:  ✔ Finished successfully!\n    // Redirected Output:       ^[[1;32m✔^[[0m Finished successfully!\n}\n\n```\n### Fallback Symbols\n\n`logsymbols` will autodetect which OS is running and will change to the proper icons on Windows. \n\nYou also can get the fallback symbols with this example:\n\n```go\n\n    fallback := logsymbols.FallbackSymbols()\n    fmt.Println(fallback.Success, \"Finished successfully!\")\n\n    // Output:  √ Finished successfully!\n}\n\n```\n\n### More examples\n\nSee [example folder](example/main.go)\n\n\n## Ported from npm version\n\n- [sindresorhus/log-symbols](https://github.com/sindresorhus/log-symbols) - Colored symbols for various log levels\n\n\n## Related\n\n- [prabirshrestha/go-log-symbols](https://github.com/prabirshrestha/go-log-symbols)\n\n- [guumaster/cligger](https://github.com/guumaster/cligger)\n\n\n\n## Author(s)\n\n* [guumaster](https://github.com/guumaster)\n\nIf you like this tool and think is worth it, you can invite me a coffee: \n\n[![paypal.me/guumaster][paypal-badge]][paypal-link]\n[![ko-fi.com/guumaster][kofi-badge]][kofi-link]\n\n\n\n\n## LICENSE\n\n [MIT license](LICENSE)\n\n\n\u003c!-- JUST BADGES \u0026 LINKS --\u003e\n[tests-badge]: https://img.shields.io/github/workflow/status/guumaster/logsymbols/Test\n[tests-link]: https://github.com/guumaster/logsymbols/actions?query=workflow%3ATest\n\n[report-badge]: https://goreportcard.com/badge/github.com/guumaster/logsymbols\n[report-link]: https://goreportcard.com/report/github.com/guumaster/logsymbols\n\n[reference-badge]: https://godoc.org/github.com/guumaster/logsymbols?status.svg\n[reference-link]: https://pkg.go.dev/github.com/guumaster/logsymbols?tab=overview\n\n\n[license-badge]: https://img.shields.io/github/license/guumaster/logsymbols\n[license-link]: https://github.com/guumaster/logsymbols/blob/master/LICENSE\n\n[coverage-badge]: https://sonarcloud.io/api/project_badges/measure?project=guumaster_logsymbols\u0026metric=coverage\n[coverage-link]: https://sonarcloud.io/dashboard?id=guumaster_logsymbols\n\n[paypal-link]: https://www.paypal.me/guumaster\n[paypal-badge]: https://img.shields.io/static/v1?label=donate\u0026message=PayPal\u0026color=00457C\u0026logo=paypal\n\n[kofi-link]: https://ko-fi.com/guumaster\n[kofi-badge]: https://img.shields.io/static/v1?label=donate\u0026message=Ko-fi\u0026color=F16061\u0026logo=ko-fi\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguumaster%2Flogsymbols","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fguumaster%2Flogsymbols","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguumaster%2Flogsymbols/lists"}