{"id":16546941,"url":"https://github.com/tomekw/sinatra-sane-logging","last_synced_at":"2025-10-28T15:32:03.371Z","repository":{"id":56895948,"uuid":"81215102","full_name":"tomekw/sinatra-sane-logging","owner":"tomekw","description":"Logging with Sinatra for human beings","archived":false,"fork":false,"pushed_at":"2017-02-08T14:17:47.000Z","size":12,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-05-09T13:51:29.843Z","etag":null,"topics":["logging","logging-library","ruby","ruby-gem","sinatra"],"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/tomekw.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-02-07T14:11:00.000Z","updated_at":"2019-08-13T11:52:19.000Z","dependencies_parsed_at":"2022-08-21T01:20:54.583Z","dependency_job_id":null,"html_url":"https://github.com/tomekw/sinatra-sane-logging","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomekw%2Fsinatra-sane-logging","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomekw%2Fsinatra-sane-logging/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomekw%2Fsinatra-sane-logging/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomekw%2Fsinatra-sane-logging/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tomekw","download_url":"https://codeload.github.com/tomekw/sinatra-sane-logging/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238672693,"owners_count":19511312,"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":["logging","logging-library","ruby","ruby-gem","sinatra"],"created_at":"2024-10-11T19:13:05.849Z","updated_at":"2025-10-28T15:31:58.073Z","avatar_url":"https://github.com/tomekw.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sinatra-sane-logging\n\n[![Code Climate](https://codeclimate.com/github/tomekw/sinatra-sane-logging/badges/gpa.svg)](https://codeclimate.com/github/tomekw/sinatra-sane-logging) [![Gem Version](https://badge.fury.io/rb/sinatra-sane-logging.svg)](https://badge.fury.io/rb/sinatra-sane-logging) [![CircleCI](https://circleci.com/gh/tomekw/sinatra-sane-logging.svg?style=svg)](https://circleci.com/gh/tomekw/sinatra-sane-logging)\n\nSinatra logging for human beings.\n\nIt allows to set both Rack, error and application logger.\n\nIt uses `Rack::Commonlogger` under the hood so the logger has to respond to:\n\n* `\u003c\u003c(message)`\n* `puts(message)`\n* `flush`\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem \"sinatra-sane-logging\", require: \"sinatra/sane_logging\"\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install sinatra-sane-logging\n\n## Usage\n\n```ruby\nrequire \"logger\"\nrequire \"sinatra/base\"\nrequire \"sinatra/sane_logging\"\n\nclass FileLogger \u003c Logger\n  def flush; end\nend\n\nclass App \u003c Sinatra::Base\n  register Sinatra::SaneLogging\n\n  sane_logging logger: Filelogger.new(File.open(\"log/app.log\", \"a+\").tap { |log_file| log_file.sync = true })\n\n  get \"/\" do\n    logger.info \"OK\"\n\n    \"OK\"\n  end\nend\n```\n\n## Development\n\nBuild the Docker image:\n\n    $ docker-compose build\n\nCreate services:\n\n    $ docker-compose create\n\nRun specs:\n\n    $ docker-compose run --rm app rspec spec\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/tomekw/sinatra-sane-logging. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomekw%2Fsinatra-sane-logging","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomekw%2Fsinatra-sane-logging","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomekw%2Fsinatra-sane-logging/lists"}