{"id":18302312,"url":"https://github.com/outscale/osc-logs","last_synced_at":"2025-08-07T18:30:02.386Z","repository":{"id":36957787,"uuid":"490588768","full_name":"outscale/osc-logs","owner":"outscale","description":"osc-logs","archived":false,"fork":false,"pushed_at":"2023-03-23T14:38:23.000Z","size":47,"stargazers_count":3,"open_issues_count":2,"forks_count":2,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-03-21T05:43:10.102Z","etag":null,"topics":["maturity-incubating"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/outscale.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSES/BSD-3-Clause.txt","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-05-10T07:30:24.000Z","updated_at":"2025-03-21T05:05:39.000Z","dependencies_parsed_at":"2024-06-19T15:11:29.604Z","dependency_job_id":null,"html_url":"https://github.com/outscale/osc-logs","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/outscale%2Fosc-logs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/outscale%2Fosc-logs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/outscale%2Fosc-logs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/outscale%2Fosc-logs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/outscale","download_url":"https://codeload.github.com/outscale/osc-logs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247352638,"owners_count":20925307,"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":["maturity-incubating"],"created_at":"2024-11-05T15:19:09.410Z","updated_at":"2025-08-07T18:30:02.358Z","avatar_url":"https://github.com/outscale.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# osc-logs\n\n[![Project Incubating](https://docs.outscale.com/fr/userguide/_images/Project-Incubating-blue.svg)](https://docs.outscale.com/en/userguide/Open-Source-Projects.html)\n\n\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"Logs Icon\" src=\"https://img.icons8.com/ios-filled/100/console.png\" width=\"100px\"\u003e\n\u003c/p\u003e\n\n---\n\n## 🌐 Links\n\n* API Reference: [Outscale API Logs](https://docs.outscale.com/api#tocslog)\n* Releases: [https://github.com/outscale/osc-logs/releases](https://github.com/outscale/osc-logs/releases)\n* jq Utility: [https://stedolan.github.io/jq/](https://stedolan.github.io/jq/)\n\n---\n\n## 📄 Table of Contents\n\n* [Overview](#-overview)\n* [Requirements](#-requirements)\n* [Installation](#-installation)\n* [Configuration](#-configuration)\n* [Usage](#-usage)\n* [Examples](#-examples)\n* [License](#-license)\n* [Contributing](#-contributing)\n\n---\n\n## 🧭 Overview\n\n**osc-logs** is a lightweight command-line utility that continuously fetches and prints API call logs from your OUTSCALE account.\n\nBy default, logs are displayed as line-delimited JSON to standard output, starting from the program’s execution time.\n\n---\n\n## ✅ Requirements\n\n* Go 1.23+ (only for manual build)\n* OUTSCALE credentials configured in `~/.osc/config.json`\n* Internet access to query the OUTSCALE API\n\n---\n\n## ⚙️ Installation\n\n### Option 1: Download Binary\n\nDownload the latest release for your platform from the [GitHub Releases page](https://github.com/outscale/osc-logs/releases).\n\n### Option 2: Install via `go install`\n\n```bash\ngo install github.com/outscale/osc-logs@latest\n```\n\n---\n\n## 🛠 Configuration\n\nThe tool uses the following file to authenticate:\n\n```\n~/.osc/config.json\n```\n\n### Example `config.json`\n\n```json\n{\n  \"default\": {\n    \"access_key\": \"MyAccessKey\",\n    \"secret_key\": \"MySecretKey\",\n    \"region\": \"eu-west-2\"\n  }\n}\n```\n\n---\n\n## 🚀 Usage\n\n```bash\nosc-logs [OPTIONS]\n```\n\n### Options\n\n| Option           | Description                                           |\n| ---------------- | ----------------------------------------------------- |\n| `-w, --write`    | Write all traces to a file instead of stdout          |\n| `-c, --count`    | Exit after `\u003ccount\u003e` logs                             |\n| `-i, --interval` | Wait `\u003cwait\u003e` seconds between API calls (default: 10) |\n| `-p, --profile`  | Use a specific config profile (default: \"default\")    |\n| `-I, --ignore`   | Ignore specific API calls (comma-separated)           |\n| `-v, --version`  | Print version and exit                                |\n\n\u003e Ignored calls default to `ReadApiLogs`. Example: `--ignore=ReadApiLogs,ReadVms`\n\n---\n\n## 💡 Examples\n\n### Write all logs to a file\n\n```bash\nosc-logs -w logs.json\n```\n\n### View logs in real-time\n\n```bash\ntail -f logs.json\n```\n\n### Filter and format using `jq`\n\nShow only date, operation name, and status code in TSV format:\n\n```bash\njq -s -r '(.[] | [.QueryDate, .QueryCallName, .ResponseStatusCode]) | @tsv' logs.json\n```\n\nSample output:\n\n```\n2022-06-17T12:14:28.378111Z\tReadVolumes\t200\n2022-06-17T12:14:30.379899Z\tCreateVms\t200\n```\n\n---\n\n## 📜 License\n\n**osc-logs** is released under the BSD 3-Clause License.\n© 2024 Outscale SAS\n\nSee [LICENSE](./LICENSE) for details.\n\n---\n\n## 🤝 Contributing\n\nSee [CONTRIBUTING.md](./CONTRIBUTING.md) for guidelines on how to contribute or run tests.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foutscale%2Fosc-logs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foutscale%2Fosc-logs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foutscale%2Fosc-logs/lists"}