Giter Club home page Giter Club logo

heroku-log-s3's Introduction

Heroku Log S3

Deploy

Configure

Setup the following ENV (aka heroku config:set)

  • FILTER_PREFIX this is the prefix string to look out for. every other log lines are ignored
  • S3_KEY, S3_SECRET, S3_BUCKET necessary ACL to your s3 bucket
  • AWS_REGION the AWS region your S3 bucket is in
  • DURATION (default 60) seconds to buffer until we close the IO to AWS::S3::S3Object#write
  • STRFTIME (default %Y%m/%d/%H/%M%S.:thread_id.log) format of your s3 object_id
    • :thread_id will be replaced by a unique number to prevent overwriting of the same file between reboots, in case the timestamp overlaps
  • HTTP_USER, HTTP_PASSWORD (default no password protection) credentials for HTTP Basic Authentication
  • WRITER_LIB (default ./writer/s3.rb) defines the ruby script to load Writer class

Using

In your heroku app, add this drain (changing HTTP_USER, HTTP_PASSWORD and DRAIN_APP_NAME to appropriate values)

heroku drains:add https://HTTP_USER:HTTP_PASSWORD@DRAIN_APP_NAME.herokuapp.com/

or if you have no password protection

heroku drains:add https://DRAIN_APP_NAME.herokuapp.com/

Credits

Alternatives

  • https://logbox.io a logs drain that forwards Heroku messages for a long‑term archival to AWS S3, Glacier or CloudWatch.
  • {insert suggestions here}

heroku-log-s3's People

Contributors

choonkeat avatar mcnelson avatar joshuacronemeyer avatar dependabot[bot] avatar prathamesh-sonpatki avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.