{"id":36584512,"url":"https://github.com/danbrakeley/dog","last_synced_at":"2026-01-12T08:01:48.591Z","repository":{"id":57555228,"uuid":"303435422","full_name":"danbrakeley/dog","owner":"danbrakeley","description":"Dog is a debug tool that serves a web page that opens a websocket back to itself for sharing real-time logs, as well as for arbitrary two-way communication.","archived":false,"fork":false,"pushed_at":"2021-04-19T14:08:36.000Z","size":1160,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-06-20T14:02:49.917Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/danbrakeley.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-10-12T15:32:23.000Z","updated_at":"2021-04-19T14:08:38.000Z","dependencies_parsed_at":"2022-09-14T10:52:09.499Z","dependency_job_id":null,"html_url":"https://github.com/danbrakeley/dog","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/danbrakeley/dog","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danbrakeley%2Fdog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danbrakeley%2Fdog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danbrakeley%2Fdog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danbrakeley%2Fdog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danbrakeley","download_url":"https://codeload.github.com/danbrakeley/dog/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danbrakeley%2Fdog/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28336959,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T06:09:07.588Z","status":"ssl_error","status_checked_at":"2026-01-12T06:05:18.301Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":[],"created_at":"2026-01-12T08:00:51.951Z","updated_at":"2026-01-12T08:01:48.587Z","avatar_url":"https://github.com/danbrakeley.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dog\n\nA logger that spins up a web browser and sends logs in real-time via websocket.\n\n## How to Build\n\n1. If you don't already have it, [install a recent version of Go](https://golang.org/doc/install).\n2. If you are on Windows, you'll want a bash shell.\n   - I use git-bash, which comes with [Git for Windows](https://gitforwindows.org).\n3. In bash, `cd` into the path where you cloned this repo, then run `./build-dev.sh`, which does the following:\n   - runs tests\n   - builds cmd/example, writing the output to `local/example[.exe]`.\n4. Run `local/example[.exe]`, then point a web browser at `localhost:8080`\n\nI've also been playing with [Air](https://github.com/cosmtrek/air) for hot-reloading. I created [my own fork/branch](https://github.com/danbrakeley/air/tree/brakeley) to pull in an unmerged PR, and added a [quick install script](https://github.com/danbrakeley/air/blob/brakeley/brakeley-install.sh).\n\n## TODO\n\n- mark a field as \"global\", showing it in a static position, and not after the log lines where it appears\n  - should this be on the server's side or a client ui?\n- structured data filters\n  - add filter for specific fields that must exist\n  - add way to filter on field values (exact, and ranges for numbers)\n- resizable column widths\n- Add options to periodically send memory/gc stats to the web viewer\n  - maybe a generic system for adding named fields and displaying them on the sidebar?\n- Instead of mirroring frog's interface, maybe make it a module that requires frog to work?\n- add multiple filters that can be quickly switched between\n- add highlights in addition to filters, for adding custom background colors to rows containing specific terms\n- ~~cleanup http server and any open connections on Close()~~\n- ~~add visually distinct formatting for fatal log lines~~\n- ~~save captured logs to text ndjson file~~\n- ~~add toggles for log levels~~\n- ~~add simple text filter (or regex?)~~\n- ~~\"currently visible\" -\u003e \"active lines\", then add \"visible\" as readonly display of actually visible lines~~\n- ~~auto reload on connection if web page found to be out of date~~\n- ~~display structured data (\"fields\")~~\n- infinity scroll\n  ```js\n    // source: https://www.javascripttutorial.net/dom/css/check-if-an-element-is-visible-in-the-viewport/\n    const isInViewport = (element) =\u003e {\n      const rect = element.getBoundingClientRect();\n      return (\n        rect.top \u003e= 0 \u0026\u0026\n        rect.left \u003e= 0 \u0026\u0026\n        rect.bottom \u003c= (window.innerHeight || document.documentElement.clientHeight) \u0026\u0026\n        rect.right \u003c= (window.innerWidth || document.documentElement.clientWidth)\n      );\n    }\n\n    scroll_parent.addEventListener('scroll',\n      () =\u003e {\n        let str = '----- ';\n        let nodes = log_line_parent.children;\n        for (let i = 0; i \u003c nodes.length; i++) {\n          if (isInViewport(nodes[i])) {\n            str += '#';\n          } else {\n            str += '_';\n          }\n        }\n        dlog(str);\n      },\n      { passive: true },\n    );\n  ```\n\n## License\n\nSee LICENSE.txt for the current license. License may change in the future.\n\nThanks to the MIT licensed software that I use, including:\n\n```text\n* Halfmoon JS\n* Version: 1.1.1\n* https://www.gethalfmoon.com\n* Copyright, Halfmoon UI\n* Licensed under MIT (https://www.gethalfmoon.com/license)\n```\n\n```text\n* FileSaver.js\n* A saveAs() FileSaver implementation.\n*\n* By Eli Grey, http://eligrey.com\n*\n* License : https://github.com/eligrey/FileSaver.js/blob/master/LICENSE.md (MIT)\n* source  : http://purl.eligrey.com/github/FileSaver.js\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanbrakeley%2Fdog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanbrakeley%2Fdog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanbrakeley%2Fdog/lists"}