{"id":23501530,"url":"https://github.com/brenekh/logange","last_synced_at":"2025-04-28T10:58:25.167Z","repository":{"id":57564698,"uuid":"336074494","full_name":"BrenekH/logange","owner":"BrenekH","description":"Another Go logger library, tailored for my use case 🤷‍♀️","archived":false,"fork":false,"pushed_at":"2022-12-26T02:38:20.000Z","size":32,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-25T07:18:23.767Z","etag":null,"topics":["go","golang","golang-library","logger","logging"],"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/BrenekH.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-02-04T20:29:44.000Z","updated_at":"2022-01-18T04:30:26.000Z","dependencies_parsed_at":"2023-01-30T23:01:54.520Z","dependency_job_id":null,"html_url":"https://github.com/BrenekH/logange","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrenekH%2Flogange","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrenekH%2Flogange/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrenekH%2Flogange/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrenekH%2Flogange/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BrenekH","download_url":"https://codeload.github.com/BrenekH/logange/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239156987,"owners_count":19591233,"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","golang-library","logger","logging"],"created_at":"2024-12-25T07:18:24.242Z","updated_at":"2025-02-16T16:30:11.054Z","avatar_url":"https://github.com/BrenekH.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Logange\n\n[![GoDoc](https://pkg.go.dev/badge/github.com/BrenekH/logange)](https://pkg.go.dev/github.com/BrenekH/logange)\n\nLogging library which mimics Python's native `logging` library.\n\n\u003e :warning: Logange is an experimental and non-production ready library. Use at your own risk.\n\n## Installation\n\nLogange can be installed using the `go get -u github.com/BrenekH/logange` command.\n\n## Concepts\n\nLogange uses loggers, formatters, and handlers.\n\nLoggers are part of a family tree with `logange.RootLogger` as the base node.\nLogs will traverse the tree calling any attached handlers on the way to the root logger.\n\nHandlers take log messages and send them to defined sources.\nThere are two handlers already available as part of Logange, `StdoutHandler` and `FileHandler` which are instantiated using `NewStdoutHandler` and `NewFileHandler` respectively.\n\nFormatters are used by handlers to add additional information to the logs.\n\n## Usage\n\n### Basic Setup\n\nThe following code creates a logger called `main`, defines how the message should be formatted, and uses the `logange.StdoutHandler` to output messages to the console.\n\n```go\npackage main\n\nimport \"github.com/BrenekH/logange\"\n\nfunc main() {\n    logger := logange.NewLogger(\"main\")\n\n    formatter := logange.StandardFormatter{FormatString: \"${datetime}|${name}|${lineno}|${levelname}|${message}\\n\"}\n    stdoutHandler := logange.NewStdoutHandler()\n\n    stdoutHandler.SetFormatter(formatter)\n    stdoutHandler.SetLevel(logange.LevelInfo)\n\n    logger.AddHandler(\u0026stdoutHandler)\n\n    logger.Info(\"Hello, World!\")\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrenekh%2Flogange","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrenekh%2Flogange","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrenekh%2Flogange/lists"}