{"id":13484217,"url":"https://github.com/asenchi/scrolls","last_synced_at":"2025-03-27T16:30:32.394Z","repository":{"id":2563120,"uuid":"3542442","full_name":"asenchi/scrolls","owner":"asenchi","description":"Simple logging","archived":false,"fork":false,"pushed_at":"2024-08-28T00:55:40.000Z","size":153,"stargazers_count":158,"open_issues_count":4,"forks_count":26,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-05T22:18:12.768Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/asenchi.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":"2012-02-25T04:35:02.000Z","updated_at":"2024-08-28T00:53:26.000Z","dependencies_parsed_at":"2024-10-30T18:41:17.396Z","dependency_job_id":null,"html_url":"https://github.com/asenchi/scrolls","commit_stats":{"total_commits":180,"total_committers":23,"mean_commits":7.826086956521739,"dds":0.5666666666666667,"last_synced_commit":"364efb989ff87ec205e7e901aa312aa2e15c57d8"},"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asenchi%2Fscrolls","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asenchi%2Fscrolls/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asenchi%2Fscrolls/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asenchi%2Fscrolls/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/asenchi","download_url":"https://codeload.github.com/asenchi/scrolls/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245882179,"owners_count":20687841,"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-07-31T17:01:20.807Z","updated_at":"2025-03-27T16:30:32.042Z","avatar_url":"https://github.com/asenchi.png","language":"Ruby","readme":"# Scrolls\n\nScrolls is a library for generating logs of the structure `key=value`.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n    gem 'scrolls'\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install scrolls\n\n## Philosophy\n\nScrolls follows the belief that logs should be treated as data. One way to think of them is the blood of your infrastructure. Logs are a realtime view of what is happening on your systems.\n\n## Usage\n\n### 0.9.0 and later\n\n```ruby\nrequire 'scrolls'\n\nScrolls.init(\n  timestamp: true,\n  global_context: {app: \"scrolls\", deploy: \"production\"},\n  exceptions: \"multi\"\n)\n\nScrolls.log(at: \"test\")\n\nScrolls.context(context: \"block\") do\n  Scrolls.log(at: \"exec\")\nend\n\nbegin\n  raise\nrescue Exception =\u003e e\n  Scrolls.log_exception(e, at: \"raise\")\nend\n```\n\nYou can also use `Scrolls#log` and `Scrolls#log_exception` without initalizing:\n\n```ruby\nrequire 'scrolls'\n\nScrolls.log(test: \"test\")\n```\n\n### Defaults\n\nHere are the defaults `Scrolls#init`:\n\n```\nstream: STDOUT\nfacility: Syslog::LOG_USER\ntime_unit: \"seconds\"\ntimestamp: false\nexceptions: \"single\"\nglobal_context: {}\nsyslog_options: Syslog::LOG_PID|Syslog::LOG_CONS\nescape_keys: false\nstrict_logfmt: false\n```\n\n## Older Versions\n\n### Pre 0.9.0\n\n```ruby\nrequire 'scrolls'\n\nScrolls.add_timestamp = true\nScrolls.global_context(:app =\u003e \"scrolls\", :deploy =\u003e \"production\")\n\nScrolls.log(:at =\u003e \"test\")\n\nScrolls.context(:context =\u003e \"block\") do\n  Scrolls.log(:at =\u003e \"exec\")\nend\n\nbegin\n  raise\nrescue Exception =\u003e e\n  Scrolls.log_exception(:at =\u003e \"raise\", e)\nend\n```\n\nProduces:\n\n```\nnow=\"2017-09-01T00:37:13Z\" app=scrolls deploy=production at=test\nnow=\"2017-09-01T00:37:13Z\" app=scrolls deploy=production context=block at=exec\nnow=\"2017-09-01T00:37:13Z\" app=scrolls deploy=production at=exception class=RuntimeError exception_id=70149797587080\nnow=\"2017-09-01T00:37:13Z\" app=scrolls deploy=production at=exception class=RuntimeError exception_id=70149797587080 site=\"./test-scrolls.rb:16:in \u003cmain\u003e\"\n```\n\n## History\n\nThis library originated from various logging methods used internally\nat Heroku. Starting at version 0.2.0 Scrolls was ripped apart and\nrestructured to provide a better foundation for the future. Tests and\ndocumentation were add at that point as well.\n\nThanks to the following people for influencing this library.\n\n* Mark McGranaghan\n* Noah Zoschke\n* Mark Fine\n* Fabio Kung\n* Ryan Smith\n\n## LICENSE\n\nMIT License\n","funding_links":[],"categories":["Logging"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasenchi%2Fscrolls","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fasenchi%2Fscrolls","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasenchi%2Fscrolls/lists"}