{"id":15654583,"url":"https://github.com/h3poteto/logist","last_synced_at":"2025-08-22T07:31:13.930Z","repository":{"id":51391499,"uuid":"114355807","full_name":"h3poteto/logist","owner":"h3poteto","description":"A json logger for Rails","archived":false,"fork":false,"pushed_at":"2024-01-18T04:23:00.000Z","size":38,"stargazers_count":26,"open_issues_count":5,"forks_count":9,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-10T16:43:14.475Z","etag":null,"topics":["json","logger","rails","ruby"],"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/h3poteto.png","metadata":{"files":{"readme":"README.md","changelog":null,"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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-12-15T09:59:02.000Z","updated_at":"2023-11-09T03:10:48.000Z","dependencies_parsed_at":"2024-10-23T04:19:20.060Z","dependency_job_id":"28b825a5-53eb-44d6-8014-e0617e92322d","html_url":"https://github.com/h3poteto/logist","commit_stats":{"total_commits":35,"total_committers":6,"mean_commits":5.833333333333333,"dds":"0.22857142857142854","last_synced_commit":"162f2bc6576663ecec90b5384608fe277d5fe400"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/h3poteto%2Flogist","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/h3poteto%2Flogist/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/h3poteto%2Flogist/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/h3poteto%2Flogist/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/h3poteto","download_url":"https://codeload.github.com/h3poteto/logist/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230568590,"owners_count":18246378,"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":["json","logger","rails","ruby"],"created_at":"2024-10-03T12:52:38.259Z","updated_at":"2024-12-20T10:08:59.137Z","avatar_url":"https://github.com/h3poteto.png","language":"Ruby","readme":"# Logist\n[![Build Status](https://travis-ci.com/h3poteto/logist.svg?branch=master)](https://travis-ci.com/h3poteto/logist)\n[![Gem Version](https://badge.fury.io/rb/logist.svg)](https://badge.fury.io/rb/logist)\n[![GitHub release](https://img.shields.io/github/release/h3poteto/logist.svg)](https://github.com/h3poteto/logist/releases)\n\nThis gem provides json format for logger in Rails. Logist output json log like this:\n\n```\n$ bundle exec rails s -b 0.0.0.0\n=\u003e Booting Puma\n=\u003e Rails 5.1.4 application starting in development\n=\u003e Run `rails server -h` for more startup options\nPuma starting in single mode...\n* Version 3.10.0 (ruby 2.4.2-p198), codename: Russell's Teapot\n* Min threads: 1, max threads: 5\n* Environment: development\n* Listening on tcp://0.0.0.0:3000\nUse Ctrl-C to stop\n{\"level\":\"INFO\",\"timestamp\":\"2017-12-18T08:55:19+00:00\",\"message\":\"hoge\",\"environment\":\"development\"}\n{\"level\":\"INFO\",\"timestamp\":\"2017-12-18T08:55:19+00:00\",\"environment\":\"development\",\"method\":\"GET\",\"path\":\"/api/health_check\",\"format\":\"html\",\"controller\":\"Api::HealthCheckController\",\"action\":\"index\",\"status\":200,\"duration\":1.89,\"view\":0.81,\"db\":0.0,\"exception\":null,\"exception_object\":null}\n```\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'logist'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install logist\n\n## Usage\n\nYou have to use logist logger in your `config/evnrionments/[rails-env].rb`:\n\n```ruby\nRails.application.configure do\n  # ...\n  config.logger = Logist::Logger.new(STDOUT)\nend\n```\n\nYou can change logger configuration like this:\n\n```ruby\nRails.application.configure do\n  # ...\n  config.logger = Logist::Logger.new(STDOUT, datetime_format: \"%Y-%m-%dT%H:%M:%S%:z:\")\nend\n```\n\nor\n\n```ruby\nRails.application.configure do\n  # ...\n  config.logger = Logist::Logger.new(STDOUT)\n  config.logger.formatter.datetime_format = \"%Y-%m-%dT%H:%M:%S%:z\"\nend\n```\n\n### flat_json option\n\nIf you want to log Hash object, but you don't want to have nested JSON, you can set `flat_json=true`:\n\n```ruby\nconfig.logger.formatter.flat_json = true\n```\n\nWhen `flat_json=false` (default):\n\n```json\n{\"level\":\"INFO\",\"message\":{\"foo\":\"bar\"}}\n```\n\nWhen `flat_json=true`:\n\n```json\n{\"level\":\"INFO\",\"foo\":\"bar\"}\n```\n\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/h3poteto/logist. 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\n## Code of Conduct\n\nEveryone interacting in the Logist project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/h3poteto/logist/blob/master/CODE_OF_CONDUCT.md).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fh3poteto%2Flogist","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fh3poteto%2Flogist","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fh3poteto%2Flogist/lists"}