{"id":19561371,"url":"https://github.com/m-mizutani/spout","last_synced_at":"2025-04-27T00:31:13.067Z","repository":{"id":65199345,"uuid":"523557900","full_name":"m-mizutani/spout","owner":"m-mizutani","description":"Lightweight structured log viewer for cloud services","archived":false,"fork":false,"pushed_at":"2023-10-25T22:05:28.000Z","size":520,"stargazers_count":4,"open_issues_count":3,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-26T07:08:33.431Z","etag":null,"topics":["go","logging","nextjs"],"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/m-mizutani.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":"2022-08-11T02:13:51.000Z","updated_at":"2025-02-12T06:39:45.000Z","dependencies_parsed_at":"2024-11-11T05:11:22.435Z","dependency_job_id":"78fa56d1-1b0e-497b-a628-a1a586499209","html_url":"https://github.com/m-mizutani/spout","commit_stats":{"total_commits":13,"total_committers":1,"mean_commits":13.0,"dds":0.0,"last_synced_commit":"6c60d6870f4baae7042ccec32203ef8de835fa0f"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-mizutani%2Fspout","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-mizutani%2Fspout/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-mizutani%2Fspout/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-mizutani%2Fspout/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/m-mizutani","download_url":"https://codeload.github.com/m-mizutani/spout/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251072279,"owners_count":21532004,"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","logging","nextjs"],"created_at":"2024-11-11T05:11:13.749Z","updated_at":"2025-04-27T00:31:13.060Z","avatar_url":"https://github.com/m-mizutani.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# spout\n\n`spout` is a lightweight log viewer for cloud service logs.\n\n![spout](https://user-images.githubusercontent.com/605953/184556440-262d8a1b-cb14-47d8-b9db-357c5bfba568.gif)\n\n## Features\n\n- Quick filtering by [jq](https://stedolan.github.io/jq/)\n- Invoke from command line with pre-defined options\n- Support multiple log sources\n  - Google Cloud Logging and JSON formatted local file for now\n\n## Installation\n\n### From releases\n\nDownload a binary for your platform from https://github.com/m-mizutani/spout/releases\n\n### Build\n\n`go install` can not be used to install because of requiring `npm`. You can build `spout` by following steps.\n\n```sh\n$ git clone https://github.com/m-mizutani/spout.git\n$ cd spout\n$ cd frontend \u0026\u0026 npm install \u0026\u0026 npm run export \u0026\u0026 cd ..\n$ go build .\n```\n\n## Usage\n\n### Google Cloud Logging\n\nExample of command line:\n\n```bash\n$ spout gcp --project \u003cyour-project-id\u003e -d 10m --filter \"resource.type=k8s_container\"\n```\n\nOptions:\n\n```\n   --addr value, -a value       Server address for browser mode (default: \"127.0.0.1:3280\") [$SPOUT_ADDR]\n   --base-time value, -t value  Base time [$SPOUT_BASE_TIME]\n   --duration value, -d value   Duration, e.g. 10m, 30s (default: \"10m\") [$SPOUT_DURATION]\n   --filter value, -f value     Google Cloud Logging filter  (accepts multiple inputs) [$SPOUT_GCP_FILTER]\n   --limit value                Limit of fetching log (default: 1000) [$SPOUT_GCP_LIMIT]\n   --mode value, -m value       Run mode [console|browser] (default: \"browser\") [$SPOUT_MODE]\n   --project value, -p value    Google Cloud Project ID [$SPOUT_GCP_PROJECT]\n   --range value, -r value      Range type [before|after|around] (default: \"before\") [$SPOUT_RANGE]\n```\n\n### Preset options\n\nSave `.spout.toml` like following at **current working directory**.\n\n```toml\n[stg]\ncommand = \"gcp\"\noptions = [\n    \"--limit\", \"100\",\n    \"--project\", \"your-staging-service\",\n    \"--filter\", 'resource.type=k8s_container labels.\"k8s-pod/services_ubie_app/app\"=\"your_app\"',\n]\n\n[prd]\ncommand = \"gcp\"\noptions = [\n    \"--limit\", \"100\",\n    \"--project\", \"your-production-service\",\n    \"--filter\", 'resource.type=k8s_container labels.\"k8s-pod/services_ubie_app/app\"=\"your_app\"',\n]\n```\n\nThen, you can call predefined options as following:\n\n```bash\n$ spout call prd # means 'gcp --limit 100 --project your-production-service ...'\n$ spout call prd --filter \"user_20352904853\" # Append '--filter \"user_20352904853\"' to existing prd options\n```\n\n## License\n\nApache version 2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm-mizutani%2Fspout","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fm-mizutani%2Fspout","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm-mizutani%2Fspout/lists"}