{"id":19156268,"url":"https://github.com/ess/s3_log","last_synced_at":"2025-02-22T21:42:04.541Z","repository":{"id":29226603,"uuid":"32758351","full_name":"ess/s3_log","owner":"ess","description":"Log to AWS S3 locations","archived":false,"fork":false,"pushed_at":"2015-03-24T18:46:19.000Z","size":156,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":3,"default_branch":"develop","last_synced_at":"2025-02-05T01:47:22.084Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","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/ess.png","metadata":{"files":{"readme":"README.md","changelog":"HISTORY.md","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":"2015-03-23T20:54:43.000Z","updated_at":"2015-03-24T19:40:32.000Z","dependencies_parsed_at":"2022-08-21T01:20:27.210Z","dependency_job_id":null,"html_url":"https://github.com/ess/s3_log","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ess%2Fs3_log","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ess%2Fs3_log/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ess%2Fs3_log/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ess%2Fs3_log/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ess","download_url":"https://codeload.github.com/ess/s3_log/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240241802,"owners_count":19770463,"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":[],"created_at":"2024-11-09T08:33:56.244Z","updated_at":"2025-02-22T21:42:04.513Z","avatar_url":"https://github.com/ess.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"## S3Log ##\n\nNaively log events to a file on S3\n\n## Gem Setup ##\n\n```ruby\ngem install s3_log\n\n# Gemfile\ngem 's3_log'\n```\n\n## Configuration ##\n\nS3Log requires an AWS access key id, AWS secret access key, and a S3 bucket (preferably created in advance) name to function. It can be configured (in a Rails initializer or what have you) like so:\n\n```ruby\nS3Log.configure(\n  access_key_id: 'YOUR AWS ACCESS KEY ID',\n  secret_access_key: 'YOUR AWS SECRET ACCESS KEY',\n  bucket: 'YOUR S3 BUCKET'\n)\n```\n\n## Usage ##\n\nBasically, logging an event is a matter of using S3Log.write to write content to a given file location on S3. The file does not have to exist prior to writing, and a write always appends to an existing file.\n\n```ruby\nS3Log.write('path/to/file', 'Some content')\n```\n\n## Caveats ##\n\nThere is no locking in this process, and an existing file will always be read and appended rather than blindly replaced. That being the case, near-simultaneous writes are won by the most recent write, and you would do well to do one of the following to avoid data loss:\n\n* Ensure that only one process writes to a given file at a time\n* Use a new file path for each write (ie models/user/1/TIMESTAMP.log rather than models/user/1.log)\n\n## Formal Documentation ##\n\nThe actual library docs can be read\n[over on rubydoc](http://rubydoc.info/gems/s3_log/frames).\n\n## Contributing ##\n\nDo you use git-flow? I sure do. Please base anything you do off of\n[the develop branch](https://github.com/ess/s3_log/tree/develop).\n\n1. Fork it.\n2. Perform some BDD magic. Seriously. Be testing.\n3. Submit a pull request.\n\n## License ##\n\nMIT License. Copyright 2015 Dennis Walters\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fess%2Fs3_log","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fess%2Fs3_log","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fess%2Fs3_log/lists"}