{"id":18026813,"url":"https://github.com/yegor256/loog","last_synced_at":"2026-02-04T08:24:37.080Z","repository":{"id":56882230,"uuid":"184859257","full_name":"yegor256/loog","owner":"yegor256","description":"Ruby object, which you can pass to other objects, where they will use it as a logger","archived":false,"fork":false,"pushed_at":"2025-12-24T21:08:52.000Z","size":308,"stargazers_count":12,"open_issues_count":3,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-12-26T00:31:00.631Z","etag":null,"topics":["logger","logging","ruby","ruby-gem"],"latest_commit_sha":null,"homepage":"https://rubygems.org/gems/loog","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/yegor256.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-05-04T06:14:37.000Z","updated_at":"2025-12-18T16:59:52.000Z","dependencies_parsed_at":"2023-10-11T13:35:29.351Z","dependency_job_id":"5618f4db-51b4-4810-804d-8385a60e87cd","html_url":"https://github.com/yegor256/loog","commit_stats":{"total_commits":23,"total_committers":2,"mean_commits":11.5,"dds":0.04347826086956519,"last_synced_commit":"9d8fb9fa96490cb07b43a5b36dc0e16b3ee9b66a"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/yegor256/loog","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yegor256%2Floog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yegor256%2Floog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yegor256%2Floog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yegor256%2Floog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yegor256","download_url":"https://codeload.github.com/yegor256/loog/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yegor256%2Floog/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28597985,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T02:08:49.799Z","status":"ssl_error","status_checked_at":"2026-01-20T02:08:44.148Z","response_time":117,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["logger","logging","ruby","ruby-gem"],"created_at":"2024-10-30T08:08:08.197Z","updated_at":"2026-02-04T08:24:37.072Z","avatar_url":"https://github.com/yegor256.png","language":"Ruby","readme":"# Object-Oriented Logger for Ruby\n\n[![EO principles respected here](https://www.elegantobjects.org/badge.svg)](https://www.elegantobjects.org)\n[![DevOps By Rultor.com](https://www.rultor.com/b/yegor256/loog)](https://www.rultor.com/p/yegor256/loog)\n[![We recommend RubyMine](https://www.elegantobjects.org/rubymine.svg)](https://www.jetbrains.com/ruby/)\n\n[![rake](https://github.com/yegor256/loog/actions/workflows/rake.yml/badge.svg)](https://github.com/yegor256/loog/actions/workflows/rake.yml)\n[![Gem Version](https://badge.fury.io/rb/loog.svg)](https://badge.fury.io/rb/loog)\n[![Maintainability](https://api.codeclimate.com/v1/badges/4346229c7af42b820e84/maintainability)](https://codeclimate.com/github/yegor256/loog/maintainability)\n[![Yard Docs](https://img.shields.io/badge/yard-docs-blue.svg)](https://rubydoc.info/github/yegor256/loog/master/frames)\n[![Test Coverage](https://img.shields.io/codecov/c/github/yegor256/loog.svg)](https://codecov.io/github/yegor256/loog?branch=master)\n[![Hits-of-Code](https://hitsofcode.com/github/yegor256/loog)](https://hitsofcode.com/view/github/yegor256/loog)\n\nLoog is an object-oriented logging wrapper around Ruby\n[`Logger`](https://ruby-doc.org/stdlib-2.4.0/libdoc/logger/rdoc/Logger.html).\n\nFirst, install it:\n\n```bash\ngem install loog\n```\n\nThen, use it like this:\n\n```ruby\nrequire 'loog'\nLoog::VERBOSE.info('Hello, world!')\n```\n\nThe gem is basically a provider of a few pre-configured loggers, which\nyou can use for production (`Loog::REGULAR`) or for testing (`Loog::VERBOSE`).\nYou can also shut it up with `Loog::NULL`.\n\nThere is also `Loog::Buffer` class that you can use for testing.\nIt accumulates all log calls and then returns the entire output\nthrough the `to_s()` method.\n\nAlso, you can \"tee\" two loogs, with the help of `Loog::Tee`. For example,\nto record everything in a buffer and also show in the console:\n\n```ruby\nrequire 'loog'\nrequire 'loog/tee'\nbuf = Loog::Buffer.new\nloog = Loog::Tee.new(Loog::VERBOSE, buf)\nloog.info('Hello, world!')\nassert(buf.to_s.include?('Hello'))\n```\n\nYou can also truncate long messages with `Loog::Ellipsized`:\n\n```ruby\nrequire 'loog'\nrequire 'loog/ellipsized'\nloog = Loog::Ellipsized.new(Loog::VERBOSE, 20)\nloog.info('This is a very long message that will be truncated')\n# prints: \"This is...truncated\"\n```\n\nYou can add ANSI colors to log messages with `Loog::Colorful`,\nwhich prints debug messages in dark gray, warnings in orange,\nand errors in red:\n\n```ruby\nrequire 'loog'\nrequire 'loog/colorful'\nloog = Loog::Colorful.new(Loog::VERBOSE)\nloog.debug('This is dark gray')\nloog.warn('This is orange')\nloog.error('This is red')\n```\n\n## How to contribute\n\nRead\n[these guidelines](https://www.yegor256.com/2014/04/15/github-guidelines.html).\nMake sure your build is green before you contribute\nyour pull request. You will need to have\n[Ruby](https://www.ruby-lang.org/en/) 2.3+ and\n[Bundler](https://bundler.io/) installed. Then:\n\n```bash\nbundle update\nbundle exec rake\n```\n\nIf it's clean and you don't see any error messages, submit your pull request.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyegor256%2Floog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyegor256%2Floog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyegor256%2Floog/lists"}