{"id":37101103,"url":"https://github.com/tauqeernasir/gcl","last_synced_at":"2026-01-14T12:17:40.621Z","repository":{"id":117357528,"uuid":"416900032","full_name":"tauqeernasir/gcl","owner":"tauqeernasir","description":"A dead-simple go colorful logging library","archived":false,"fork":false,"pushed_at":"2021-10-15T17:38:16.000Z","size":1069,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-06-20T17:43:03.990Z","etag":null,"topics":["golang-logger","golang-logging","logging","logging-lib","logging-library"],"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/tauqeernasir.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":"2021-10-13T21:15:04.000Z","updated_at":"2021-10-15T17:38:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"2e922ae3-43ab-4ca7-9c2a-b208a12b6bb6","html_url":"https://github.com/tauqeernasir/gcl","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/tauqeernasir/gcl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tauqeernasir%2Fgcl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tauqeernasir%2Fgcl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tauqeernasir%2Fgcl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tauqeernasir%2Fgcl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tauqeernasir","download_url":"https://codeload.github.com/tauqeernasir/gcl/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tauqeernasir%2Fgcl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28419939,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T10:47:48.104Z","status":"ssl_error","status_checked_at":"2026-01-14T10:46:19.031Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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-logger","golang-logging","logging","logging-lib","logging-library"],"created_at":"2026-01-14T12:17:40.007Z","updated_at":"2026-01-14T12:17:40.605Z","avatar_url":"https://github.com/tauqeernasir.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Go colorful logging\n\nA dead simple go logging utility with or without colors.\n\n### Usage\n\n```go\n\npackage main\n\nimport (\n\t\"os\"\n\n\t\"github.com/tauqeernasir/gcl/gcl\"\n)\n\nvar Logger *gcl.Logger\n\nfunc init() {\n\tLogger = gcl.NewLogger(os.Stdout)\n}\n\nfunc main() {\n\tLogger.Info(\"I am an information message.\")\n\tLogger.Error(\"I am an error message.\")\n\tLogger.Success(\"I am a success message.\")\n\tLogger.Warn(\"I am a warning message.\")\n\tLogger.Fatal(\"I am a fatal message.\")\n}\n\n```\n\nAbove code will generate the following output\n\n\u003cimg width=\"716\" alt=\"Screen Shot 2021-10-14 at 1 49 02 AM\" src=\"https://user-images.githubusercontent.com/60596259/137217277-a4109709-a6ea-43bf-9c26-e8b0e00e53dd.png\"\u003e\n\n\u003e Every method supports formatted versions as well, such as `Logger.Infof(format string, args ...interface{})` and `Logger.Errorf(format string, args ...interface{})`.\n\n### Configurations\n\nYou can turn on/off some features of the logger by calling following methods on `Logger`\n- WithColor() or WithoutColor()\n- WithTimestamp() or WithoutTimestamp\n- WithFileInfo() or WithoutFileInfo()\n\nAll methods return reference to the `Logger`, so they can easily be chained. Like `Logger.WithColor().WithoutTimestamp().WithoutFileInfo()`\n\n#### Logging to file\n\n```go\n\npackage main\n\nimport (\n\t\"os\"\n\n\t\"github.com/tauqeernasir/gcl/gcl\"\n)\n\nvar Logger *gcl.Logger\n\nfunc init() {\n\t// create a file\n\tf, err := os.Create(\"log.txt\")\n\tif err != nil {\n\t\tpanic(\"couldn't create log.txt file\")\n\t}\n\t\n\t// provide file to logger\n\tLogger = gcl.NewLogger(f).WithoutColor()\n}\n\nfunc main() {\n\tLogger.Info(\"I am an information message.\")\n\tLogger.Error(\"I am an error message.\")\n\tLogger.Success(\"I am a success message.\")\n\tLogger.Warn(\"I am a warning message.\")\n\tLogger.Fatal(\"I am a fatal message.\")\n}\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftauqeernasir%2Fgcl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftauqeernasir%2Fgcl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftauqeernasir%2Fgcl/lists"}