Setup the following ENV
(aka heroku config:set
)
FILTER_PREFIX
this is the prefix string to look out for. every other log lines are ignoredS3_KEY
,S3_SECRET
,S3_BUCKET
necessary ACL to your s3 bucketAWS_REGION
the AWS region your S3 bucket is inDURATION
(default60
) seconds to buffer until we close theIO
toAWS::S3::S3Object#write
STRFTIME
(default%Y%m/%d/%H/%M%S.:thread_id.log
) format of your s3object_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 AuthenticationWRITER_LIB
(default./writer/s3.rb
) defines the ruby script to loadWriter
class
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/
- https://github.com/rwdaigle/heroku-log-parser
- https://github.com/rwdaigle/heroku-log-store
- https://logbox.io a logs drain that forwards Heroku messages for a long‑term archival to AWS S3, Glacier or CloudWatch.
- {insert suggestions here}