{"id":30274301,"url":"https://github.com/armchairtheorist/mongoid_appender","last_synced_at":"2025-08-16T08:30:08.809Z","repository":{"id":20018208,"uuid":"23285964","full_name":"armchairtheorist/mongoid_appender","owner":"armchairtheorist","description":"Simple implementation of a logging appender for Tim Pease's Logging framework using Mongoid.","archived":false,"fork":false,"pushed_at":"2017-05-19T05:43:27.000Z","size":8,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-28T04:25:29.745Z","etag":null,"topics":["appender","logging","mongodb","mongoid","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/armchairtheorist.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-08-24T16:25:37.000Z","updated_at":"2017-05-16T09:57:43.000Z","dependencies_parsed_at":"2022-07-23T14:32:14.310Z","dependency_job_id":null,"html_url":"https://github.com/armchairtheorist/mongoid_appender","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/armchairtheorist/mongoid_appender","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/armchairtheorist%2Fmongoid_appender","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/armchairtheorist%2Fmongoid_appender/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/armchairtheorist%2Fmongoid_appender/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/armchairtheorist%2Fmongoid_appender/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/armchairtheorist","download_url":"https://codeload.github.com/armchairtheorist/mongoid_appender/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/armchairtheorist%2Fmongoid_appender/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270116378,"owners_count":24530273,"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","status":"online","status_checked_at":"2025-08-12T02:00:09.011Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["appender","logging","mongodb","mongoid","ruby"],"created_at":"2025-08-16T08:30:05.648Z","updated_at":"2025-08-16T08:30:08.732Z","avatar_url":"https://github.com/armchairtheorist.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Gem Version](https://badge.fury.io/rb/mongoid_appender.svg)](https://badge.fury.io/rb/mongoid_appender)\n[![Code Climate](https://codeclimate.com/github/armchairtheorist/mongoid_appender/badges/gpa.svg)](https://codeclimate.com/github/armchairtheorist/mongoid_appender)\n\n# MongoidAppender\n\nMongoidAppender is a simple implementation of a standard `Logging::Appender` for Tim Pease's [Logging](http://github.com/TwP/logging) framework using [Mongoid](http://www.mongoid.org), useful for writing log messages into MongoDB. MongoidAppender has been tested with both Mongoid 3.x and 4.0.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'mongoid_appender'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install mongoid_appender\n\n## Usage\n\nConfigure MongoidAppender as you would a normal `Logging::Appender`. For example, to configure your root logger to output all messages to `stdout` but only write `:warn` messages and above to MongoDB, you can use the following code:\n\n```ruby\nrequire 'logging'\nrequire 'mongoid'\n\n# Some code to set up Mongoid here...\n\nLogging.logger.root.add_appenders(\n    Logging.appenders.stdout,\n\tMongoidAppender.new('mongoid', :level =\u003e :warn)\n)\n```\n\nBy default, MongoidAppender will write log documents into a MongoDB collection named `logs`. Every document has the following fields:\n\n* `level` - The event level (debug, info, warn, error, etc.)\n* `logger` - The name of the logger\n* `message` - The log message\n* `exception` - The log exception (if any)\n* `backtrace` - The log backtrace (if any)\n\nSimple!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farmchairtheorist%2Fmongoid_appender","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farmchairtheorist%2Fmongoid_appender","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farmchairtheorist%2Fmongoid_appender/lists"}