{"id":19322614,"url":"https://github.com/picatz/logoris","last_synced_at":"2025-04-22T19:31:36.458Z","repository":{"id":56881930,"uuid":"85510050","full_name":"picatz/logoris","owner":"picatz","description":"Logoris a Ruby gem that provides a simple, unified interface to manage logging for command-line applications to the appropriate standard stream.","archived":false,"fork":false,"pushed_at":"2017-03-19T21:43:40.000Z","size":8,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-20T05:55:41.163Z","etag":null,"topics":["command-line","logging","ruby"],"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/picatz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-19T21:29:00.000Z","updated_at":"2023-06-08T19:58:07.000Z","dependencies_parsed_at":"2022-08-20T13:00:40.434Z","dependency_job_id":null,"html_url":"https://github.com/picatz/logoris","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/picatz%2Flogoris","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/picatz%2Flogoris/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/picatz%2Flogoris/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/picatz%2Flogoris/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/picatz","download_url":"https://codeload.github.com/picatz/logoris/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223903660,"owners_count":17222550,"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":["command-line","logging","ruby"],"created_at":"2024-11-10T01:41:51.309Z","updated_at":"2024-11-10T01:41:51.396Z","avatar_url":"https://github.com/picatz.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"![This guy is cool.](http://i.imgur.com/0PB84Kg.png)\n\n# Logoris\n\nLogoris a Ruby gem that provides a simple, unified interface to manage logging for command-line applications to the appropriate standard stream.\n\n### Why should I use this?\n\nDo you hate having to manage your standard streams? Are your stderr events actually going to stdout, and you're like \"whoa I didn't even know?\" -- and you want a simple way to do this? You silly rabbit you: this is the gem for you.\n\n#### STDOUT\n\nBasically, when you do a `puts`, then you're going to STDOUT. This is where most of the good stuff happens.\n\n#### STDERR\n\nWhoa, you got some sort of gnarly error. Maybe some sort of diagnostics information that isn't really supposed to be parsed by normal input that happens for STDOUT? Well, we have STDERR for that stuff, silly.\n\n## Installation\n\n    $ gem install logoris\n\n## Usage\n\n```ruby\nrequire 'logoris'\n\n# create a new logoris instance, ya' know\nlogger = Logoris.new(log_file: \"/var/log/some_application.log\")\n\nlogger.error \"This will go to STDERR\" # for your errors\nlogger.out \"This will go to STDOUT\"   # for your normal stuff\n\n# why not check if the log exists?\nlogger.log_exists?(logger.log_file)\n# =\u003e true\n# there's almost no reason for this method\n# but, there's a method to my madness\n# :)\n```\n\nMaybe you want to log your errors and regular output in their own special files?\n\n```ruby\n# assuming you've already created a new logoris instance, ya' know\n\n# log them errors\nlogger.error_file = \"error.log\"\nlogger.error \"This will go a to file (error.log), and to stderr\"\n\n# log them... not errors?\nlogger.out_file = \"not_errors.log\"\nlogger.out \"This will go a to file (not_errors.log), and to stdout\"\n\n# Totes proving it works via this static example.\nFile.readlines(logger.error_file)\n# =\u003e [\"This will go a to file (error.log), and to stderr\\n\"]\n```\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpicatz%2Flogoris","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpicatz%2Flogoris","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpicatz%2Flogoris/lists"}