{"id":26260582,"url":"https://github.com/rammyblog/logviz","last_synced_at":"2025-04-30T07:05:11.476Z","repository":{"id":229252276,"uuid":"776202014","full_name":"rammyblog/LogViz","owner":"rammyblog","description":"HTTP request logger dashboard for Golang","archived":false,"fork":false,"pushed_at":"2024-03-27T21:31:09.000Z","size":54,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-30T07:05:03.062Z","etag":null,"topics":["alpinejs","go","golang","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/rammyblog.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-22T22:17:56.000Z","updated_at":"2024-05-25T17:24:38.000Z","dependencies_parsed_at":"2024-06-21T04:14:02.284Z","dependency_job_id":null,"html_url":"https://github.com/rammyblog/LogViz","commit_stats":null,"previous_names":["rammyblog/logvix","rammyblog/logviz"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rammyblog%2FLogViz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rammyblog%2FLogViz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rammyblog%2FLogViz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rammyblog%2FLogViz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rammyblog","download_url":"https://codeload.github.com/rammyblog/LogViz/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251658200,"owners_count":21622819,"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":["alpinejs","go","golang","logging"],"created_at":"2025-03-13T23:16:21.071Z","updated_at":"2025-04-30T07:05:11.453Z","avatar_url":"https://github.com/rammyblog.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LogViz\n\nThis Go package offers a request logging and viewing system designed for web applications built with frameworks like Chi or Gin. It enables developers to log and review HTTP requests sent to their applications, aiding in debugging and monitoring processes.\n\n![Logviz](https://res.cloudinary.com/rammy/image/upload/v1711575024/logwiz.png)\n\n## Table of Contents\n\n- [Installation](#installation)\n- [Usage](#usage)\n- [Contributing](#contributing)\n- [License](#license)\n\n## Installation\n\nRun the following command to install Horus on your project:\n\n```bash\ngo get github.com/rammyblog/logviz\n```\n\n![logviz2](https://res.cloudinary.com/rammy/image/upload/v1711575024/logwiz2.png)\n\n\n## Usage\n\n```\n\npackage main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n\t\"time\"\n\n\t\"github.com/rammyblog/logviz\"\n)\n\n// Example handler\nfunc HelloHandler(w http.ResponseWriter, r *http.Request) {\n\tw.Header().Set(\"Content-Type\", \"text/plain\")\n\ttime.Sleep(2 * time.Millisecond)\n\tw.WriteHeader(http.StatusBadGateway)\n\tw.Write([]byte(\"Hello world\"))\n}\n\nfunc SecondHandler(w http.ResponseWriter, r *http.Request) {\n\tw.Header().Set(\"Content-Type\", \"text/plain\")\n\tw.WriteHeader(http.StatusBadGateway)\n\tw.Write([]byte(\"second handler\"))\n}\n\nfunc main() {\n\t// Create a new ServeMux\n\tmux := http.NewServeMux()\n\n\treqLogger, err := logviz.Init(\"postgres\", logviz.DbConfig{\n\t\tDbUser:     \"postgres\",\n\t\tDbPassword: \"password\",\n\t\tDbHost:     \"localhost\",\n\t\tDbName:     \"logviz\",\n\t\tDbPort:     \"5429\",\n\t})\n\n\tif err != nil {\n\t\tfmt.Println(err)\n\t}\n\treqLogger.Serve(\":5009\")\n\n\tmux.Handle(\"/\", reqLogger.Logger(http.HandlerFunc(HelloHandler)))\n\tmux.Handle(\"/second\", reqLogger.Logger(http.HandlerFunc(SecondHandler)))\n\n\t// Start the server\n\tlog.Println(\"Server started on :8080\")\n\tlog.Fatal(http.ListenAndServe(\":8080\", mux))\n}\n\n```\n\nThen visit the site on `http://localhost:\u003cPORT\u003e` to view the logs\n\nIt only supports Postgres and MySQL for now, but support for other databases will be added soon.\n\n## Contributing:\nContributions are welcome! Feel free to open issues or pull requests for bug fixes, enhancements, or new features\n\n## License\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frammyblog%2Flogviz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frammyblog%2Flogviz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frammyblog%2Flogviz/lists"}