{"id":28233457,"url":"https://github.com/logdna/logdna_lograge_example","last_synced_at":"2025-07-04T17:11:54.406Z","repository":{"id":43488747,"uuid":"404199730","full_name":"logdna/logdna_lograge_example","owner":"logdna","description":"Example architecture using LogDNA, Lograge and Ruby on Rails to build a secret message app.","archived":false,"fork":false,"pushed_at":"2023-05-05T21:38:06.000Z","size":1022,"stargazers_count":2,"open_issues_count":13,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-18T21:10:03.489Z","etag":null,"topics":[],"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/logdna.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-09-08T03:33:58.000Z","updated_at":"2023-07-25T14:49:28.000Z","dependencies_parsed_at":"2023-02-11T21:46:12.154Z","dependency_job_id":null,"html_url":"https://github.com/logdna/logdna_lograge_example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/logdna/logdna_lograge_example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/logdna%2Flogdna_lograge_example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/logdna%2Flogdna_lograge_example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/logdna%2Flogdna_lograge_example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/logdna%2Flogdna_lograge_example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/logdna","download_url":"https://codeload.github.com/logdna/logdna_lograge_example/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/logdna%2Flogdna_lograge_example/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263586002,"owners_count":23484494,"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":"2025-05-18T21:10:03.326Z","updated_at":"2025-07-04T17:11:54.401Z","avatar_url":"https://github.com/logdna.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ruby on Rails, Lograge and LogDNA\n\n### Welcome, welcome.\n\nFirst off, thanks for visitng!  In this repo you will find instructions on how to tool \u003ca href=\"https://rubyonrails.org/\" target=\"_blank\"\u003eRails\u003c/a\u003e using the \u003ca href=\"https://github.com/roidrage/lograge\" target=\"_blank\"\u003eLograge\u003c/a\u003e gem with \u003ca href=\"https://logdna.com\" target=\"_blank\"\u003eLogDNA\u003c/a\u003e via a simple cryptographic app that deciphers a secret message using a key logged to LogDNA.\n\n## TL;DR;\n\nBeen here done that and just wanna see the LogDNA / Lograge specifics?\n\n1. Add LogDNA and Lograge gems to your [Gemfile](src/decipher/Gemfile#L59).\n```ruby\ngem \"logdna\"\ngem \"lograge\"\n```\n2. Enable [Lograge via an initializer](src/decipher/config/initializers/lograge.rb)\n```ruby\nRails.application.configure do\n  config.lograge.enabled = true\n  config.lograge.formatter = Lograge::Formatters::Json.new\nend\n```\n3. Specify LogDNA as your logger in the [environment configs](src/decipher/config/environments/development.rb#L79) and set the [API key](https://app.logdna.com/manage/api-keys).\n```ruby\nconfig.logger = Logdna::Ruby.new(\n    LOGDNA_API_KEY, {\n        :app =\u003e \"rails-lograge-decipher\"\n    }\n)\n```\n\n\u003e **Pro tip:** send data via JSON with a \"message\" for easy scanning in LogDNA's [Log Viewer](https://docs.logdna.com/docs/how-to-use-the-dashboard). See the log's message definition [here](src/decipher/app/controllers/app_controller.rb#L59).\n\n**Q.E.D.**\n\n## Guide\n\nYou can check out the detailed guide [here](./GUIDE.md).\n\nIn the end, the gist is to (assuming you got a Rails app already tooled with LogRage handy):\n\n0. Steep tea\n1. Connect to LogDNA using your accounts \u003ca href=\"https://docs.logdna.com/docs/ingestion-key\" target=\"_blank\"\u003eAPI key\u003c/a\u003e.\n2. Configure Lograge to utilize LogDNA.\n3. Restart Rails.\n4. Sit back. Witness logs \u003ca href=\"https://app.logdna.com\" target=\"_blank\"\u003ein LogDNA\u003c/a\u003e.\n5. Enjoy tea.\n\n## Blog\n\nWe wrote a short blog on this that you can read [here](https://www.logdna.com/blog/taming-ruby-on-rails-logging-with-lograge-and-logdna). \n\n## Contributing\n\n[Bug reports](https://github.com/logdna/logdna_lograge_example/issues) and [pull requests](https://github.com/logdna/logdna_lograge_example/pulls) are welcome on GitHub at [logdna/logdna_lograge_example](https://github.com/logdna/logdna_lograge_example).  Be sure to first check out our [contributing doc](./CONTRIBUTING.md).\n\n## License\n\nWe use a standard [MIT](./LICENSE) license on this repo.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flogdna%2Flogdna_lograge_example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flogdna%2Flogdna_lograge_example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flogdna%2Flogdna_lograge_example/lists"}