{"id":16057258,"url":"https://github.com/markbates/split_logger","last_synced_at":"2025-07-04T23:08:36.706Z","repository":{"id":670294,"uuid":"313600","full_name":"markbates/split_logger","owner":"markbates","description":"Delegates logging calls to many loggers.","archived":false,"fork":false,"pushed_at":"2014-01-22T16:32:05.000Z","size":148,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-25T17:59:01.196Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://www.metabates.com","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/markbates.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":"2009-09-21T20:43:01.000Z","updated_at":"2017-06-11T17:47:29.000Z","dependencies_parsed_at":"2022-07-07T23:25:07.243Z","dependency_job_id":null,"html_url":"https://github.com/markbates/split_logger","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/markbates/split_logger","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markbates%2Fsplit_logger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markbates%2Fsplit_logger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markbates%2Fsplit_logger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markbates%2Fsplit_logger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/markbates","download_url":"https://codeload.github.com/markbates/split_logger/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markbates%2Fsplit_logger/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263632058,"owners_count":23491530,"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-10-09T03:01:43.747Z","updated_at":"2025-07-04T23:08:36.690Z","avatar_url":"https://github.com/markbates.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SplitLogger\n[![Build Status](https://travis-ci.org/markbates/split_logger.png)](https://travis-ci.org/markbates/split_logger) [![Code Climate](https://codeclimate.com/github/markbates/split_logger.png)](https://codeclimate.com/github/markbates/split_logger)\n\nThis gem let's you write to multiple log destinations at the same time.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'split_logger'\n```\n\nAnd then execute:\n\n```console\n$ bundle\n```\n\nOr install it yourself as:\n\n```console\n$ gem install split_logger\n```\n\n## Usage\n\nYou can set up loggers in one of two ways:\n\n```ruby\nlogger = SplitLogger.new\nlogger.add(std: Logger.new(STDOUT))\nlogger.add(file: Logger.new(\"/path/to/log\"))\nlogger.level = ::Logger::INFO\n\nlogger.info \"Hello Logs\"\n```\n\nor you can pass them all into the initializer:\n\n```ruby\nlogger = SplitLogger.new({\n  std: Logger.new(STDOUT),\n  file: Logger.new(\"/path/to/log\")\n})\nlogger.level = ::Logger::INFO\n\nlogger.info \"Hello Logs\"\n```\n\n### Rails\n\nBy default the Rails logger is automatically added when creating a new `SplitLogger`.\n\nOf course, if you don't want the Rails logger it can easily be removed.\n\n```ruby\nlogger.remove(:rails_default_logger)\n```\n\n## Contributing\n\n1. Fork it ( http://github.com/\u003cmy-github-username\u003e/split_logger/fork )\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkbates%2Fsplit_logger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarkbates%2Fsplit_logger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkbates%2Fsplit_logger/lists"}