{"id":20796499,"url":"https://github.com/disgoorg/dislog","last_synced_at":"2025-07-14T11:10:02.477Z","repository":{"id":44165411,"uuid":"360265594","full_name":"disgoorg/dislog","owner":"disgoorg","description":"Logrus Hook for sending Logs into Discord","archived":false,"fork":false,"pushed_at":"2022-12-17T01:52:03.000Z","size":41,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-06T15:30:11.504Z","etag":null,"topics":["discord-logging","go","golang","logrus","logrus-hook"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/disgoorg.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":"2021-04-21T18:17:35.000Z","updated_at":"2024-10-20T17:46:44.000Z","dependencies_parsed_at":"2022-08-27T22:01:35.953Z","dependency_job_id":null,"html_url":"https://github.com/disgoorg/dislog","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/disgoorg/dislog","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/disgoorg%2Fdislog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/disgoorg%2Fdislog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/disgoorg%2Fdislog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/disgoorg%2Fdislog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/disgoorg","download_url":"https://codeload.github.com/disgoorg/dislog/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/disgoorg%2Fdislog/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265281372,"owners_count":23739875,"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":["discord-logging","go","golang","logrus","logrus-hook"],"created_at":"2024-11-17T16:27:28.070Z","updated_at":"2025-07-14T11:10:02.449Z","avatar_url":"https://github.com/disgoorg.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Go Reference](https://pkg.go.dev/badge/github.com/disgoorg/dislog.svg)](https://pkg.go.dev/github.com/disgoorg/dislog)\n[![Go Report](https://goreportcard.com/badge/github.com/disgoorg/dislog)](https://goreportcard.com/report/github.com/disgoorg/dislog)\n[![Go Version](https://img.shields.io/github/go-mod/go-version/disgoorg/dislog)](https://golang.org/doc/devel/release.html)\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/disgoorg/dislog/blob/master/LICENSE)\n[![Disgo Version](https://img.shields.io/github/v/release/disgoorg/dislog)](https://github.com/disgoorg/dislog/releases/latest)\n[![Disgo Discord](https://discord.com/api/guilds/817327181659111454/widget.png)](https://discord.gg/BDfhKG7Ce8)\n\n# dislog\n\ndislog is a [logrus](https://github.com/sirupsen/logrus) [logging hook](https://github.com/sirupsen/logrus#hooks) sending logs over [Discord Webhooks](https://discord.com/developers/docs/resources/webhook) using the [disgohook](https://github.com/disgoorg/dislog) library\n\n## Getting Started\n\n### Installing\n\n```sh\ngo get github.com/disgoorg/dislog\n```\n\n### Usage\n\nImport the package into your project.\n\n```go\nimport \"github.com/disgoorg/dislog\"\n```\n\nCreate a new [logrus](https://github.com/sirupsen/logrus) logger then create a new dislog instance by providing the webhook id and webhook token.\n\n```go\nlogger := logrus.New()\ndlog, err := dislog.New(\n    // Sets which logging levels to send to the webhook\n    dislog.WithLogLevels(dislog.TraceLevelAndAbove...),\n    // Sets webhook id \u0026 token\n    dislog.WithWebhookIDToken(webhookID, webhookToken),\n)\nif err != nil {\n    logger.Fatal(\"error initializing dislog: \", err)\n}\ndefer dlog.Close()\nlogger.AddHook(dlog)\n```\n\n## Documentation\n\nDocumentation can be found here\n\n* [![Go Reference](https://pkg.go.dev/badge/github.com/disgoorg/dislog.svg)](https://pkg.go.dev/github.com/disgoorg/dislog)\n* [![logrus Hooks Documentation](https://img.shields.io/badge/logrus%20Documentation-blue.svg)](https://github.com/sirupsen/logrus#hooks)\n\n## Examples\n\nYou can find examples [here](https://github.com/disgoorg/dislog/tree/master/_examples)\n\n## Troubleshooting\n\nFor help feel free to open an issue or reach out on [Discord](https://discord.gg/BDfhKG7Ce8)\n\n## Contributing\n\nContributions are welcomed but for bigger changes please first reach out via [Discord](https://discord.gg/BDfhKG7Ce8) or create an issue to discuss your intentions and ideas.\n\n## License\n\nDistributed under the [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/disgoorg/dislog/blob/master/LICENSE). See LICENSE for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdisgoorg%2Fdislog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdisgoorg%2Fdislog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdisgoorg%2Fdislog/lists"}