{"id":19299219,"url":"https://github.com/ecraft/logging_library","last_synced_at":"2025-10-07T09:46:21.035Z","repository":{"id":56881899,"uuid":"78848580","full_name":"ecraft/logging_library","owner":"ecraft","description":"Logging library","archived":false,"fork":false,"pushed_at":"2020-03-19T12:40:45.000Z","size":47,"stargazers_count":0,"open_issues_count":4,"forks_count":2,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-04-11T19:18:35.023Z","etag":null,"topics":["gem","logging","ruby","uxfactory-server"],"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/ecraft.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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":"2017-01-13T12:45:51.000Z","updated_at":"2018-04-06T08:14:52.000Z","dependencies_parsed_at":"2022-08-20T23:40:34.537Z","dependency_job_id":null,"html_url":"https://github.com/ecraft/logging_library","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ecraft%2Flogging_library","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ecraft%2Flogging_library/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ecraft%2Flogging_library/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ecraft%2Flogging_library/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ecraft","download_url":"https://codeload.github.com/ecraft/logging_library/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250215386,"owners_count":21393789,"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":["gem","logging","ruby","uxfactory-server"],"created_at":"2024-11-09T23:10:36.916Z","updated_at":"2025-10-07T09:46:15.985Z","avatar_url":"https://github.com/ecraft.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/ecraft/logging_library.svg?branch=master)](https://travis-ci.org/ecraft/logging_library) [![Gem Version](https://badge.fury.io/rb/logging_library.svg)](https://badge.fury.io/rb/logging_library)\n\n# LoggingLibrary\n\nThis library provides logging support for your application or framework, with an opinionated default configuration in terms of log\nformat, etc.\n\nIt is compatible with both JRuby and MRI.\n\nWraps the functionality of [mixlog-log](https://github.com/chef/mixlib-log).\n\n## Installation\n\nAdd this line to your application's `Gemfile`:\n\n```ruby\ngem 'logging_library'\n```\n\nAnd then execute:\n\n    $ bundle install\n\n## Usage\n\n```ruby\nrequire 'logging_library'\n\nclass MyClass\n  include LoggingLibrary::Loggable\n\n  def load_data_from_database\n    logger.info('Starting to load data from database')\n\n    # DEBUG-level messages are not printed by default; see logger#level= if you\n    # want to customize the log level.\n    logger.debug(\"Running as user #{current_user}\")\n\n    # If you use blocks to wrap log messages, they'll only execute if needed\n    logger.debug { \"Score for all participants: #{expensive_operation}\" }\n  end\n\n  def current_user\n    'john_doe'\n  end\n\n  def expensive_operation\n    sleep 5\n    9_000\n  end\nend\n```\n\n## Environment variables\n\n- `LOGGING_LIBRARY_DISABLE_TIMESTAMPS` - set this to any value to disable\n  timestamping which is otherwise performed on log entries when running in\n  interactive/TTY mode. This setting can be useful in scenarios where you\n  would otherwise get double timestamps on each line.\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then,\nrun `rake spec` to run the tests. You can also run `bin/console` for an\ninteractive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`.\nTo release a new version, update the version number in `version.rb`, and then\nrun `bundle exec rake release`, which will create a git tag for the version,\npush git commits and tags, and push the `.gem` file to\n[rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at\nhttps://github.com/ecraft/logging_library. This project is intended to\nbe a safe, welcoming space for collaboration, and contributors are expected to\nadhere to the [Contributor Covenant](http://contributor-covenant.org) code of\nconduct.\n\n### Documentation\n\nWe strive to write API documentation inline in [YARD](http://yardoc.org) format.\n\nGenerate API documentation using `yardoc` or `rake yard`.\n\nPreview API documentation locally with\n\n```\nbundle exec yard server -r\n```\n\n### Releasing a new version\n\n- Bump the version in `version.rb`\n- Create the tag:\n\n  ```\n  $ git release v1.0.x`\n  ```\n\n- Build the gemfile and push it to Rubygems.org:\n\n  ```shell\n  $ bundle exec rake build release\n  ```\n\n- Generate the changelog (`cargo install changelog-rs \u0026\u0026 changelog-rs .`) and copy the relevant lines to [the releases page](https://github.com/ecraft/logging_library/releases).\n\n### License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fecraft%2Flogging_library","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fecraft%2Flogging_library","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fecraft%2Flogging_library/lists"}