{"id":18787236,"url":"https://github.com/pantani/logger","last_synced_at":"2025-12-23T15:30:28.487Z","repository":{"id":57525668,"uuid":"250834000","full_name":"Pantani/logger","owner":"Pantani","description":"Simple log package.","archived":false,"fork":false,"pushed_at":"2021-02-26T01:33:33.000Z","size":12,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-29T13:23:06.961Z","etag":null,"topics":["go","golang","log","log-handler","logger","logging","logging-helper"],"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/Pantani.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":"2020-03-28T15:48:03.000Z","updated_at":"2023-09-30T10:45:28.000Z","dependencies_parsed_at":"2022-09-07T10:21:01.678Z","dependency_job_id":null,"html_url":"https://github.com/Pantani/logger","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pantani%2Flogger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pantani%2Flogger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pantani%2Flogger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pantani%2Flogger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Pantani","download_url":"https://codeload.github.com/Pantani/logger/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239707317,"owners_count":19684044,"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","golang","log","log-handler","logger","logging","logging-helper"],"created_at":"2024-11-07T20:53:55.917Z","updated_at":"2025-12-23T15:30:27.912Z","avatar_url":"https://github.com/Pantani.png","language":"Go","readme":"[![Go Reference](https://pkg.go.dev/badge/github.com/Pantani/logger.svg)](https://pkg.go.dev/github.com/Pantani/logger)\n[![codecov](https://codecov.io/gh/Pantani/logger/branch/master/graph/badge.svg?token=3CHQF7L76B)](https://codecov.io/gh/Pantani/logger)\n\n# Simple log package\n\nSimple abstraction for logs using [Logrus](https://github.com/sirupsen/logrus).\n\nE.g.:\n\n- Log message:\n```go\nlogger.Info(\"Loading Observer API\")\n```\n\n- Log message with params:\n```go\nlogger.Info(\"Running application\", logger.Params{\"bind\": bind})\n```\n\n- Fatal with error:\n```go\nlogger.Fatal(\"Application failed\", err)\n```\n\n- The method parameters don't have a sort. You just need to pass them to the method:\n```go\nlogger.Fatal(err, \"Application failed\")\n```\n\n- Create a simple error log:\n```go\nlogger.Error(err)\n```\n\n- Create an error log with a message:\n```go\nlogger.Error(\"Failed to initialize API\", err)\n```\n\n- Create an error log, with error, message, and params:\n```\np := logger.Params{\n\t\"platform\": handle,\n\t\"coin\":     platform.Coin(),\n}\nerr := platform.Init()\nif err != nil {\n\tlogger.Error(\"Failed to initialize API\", err, p)\n}\n```\n\n- Debug log:\n```go\nlogger.Debug(\"Loading Observer API\")\n// OR \nlogger.Debug(\"Loading Observer API\", logger.Params{\"bind\": bind})\n```\n\n- Warning log:\n```go\nlogger.Warn(\"Warning\", err)\n// OR \nlogger.Warn(err, \"Warning\")\n// OR \nlogger.Warn(\"Warning\", err, logger.Params{\"bind\": bind})\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpantani%2Flogger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpantani%2Flogger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpantani%2Flogger/lists"}