{"id":22808245,"url":"https://github.com/sixarm/sixarm_ruby_pro_logger","last_synced_at":"2025-03-30T21:15:43.256Z","repository":{"id":1936723,"uuid":"2865712","full_name":"SixArm/sixarm_ruby_pro_logger","owner":"SixArm","description":"SixArm.com » Ruby » ProLogger custom logger with better information","archived":false,"fork":false,"pushed_at":"2023-09-15T19:28:50.000Z","size":460,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-06T00:24:24.225Z","etag":null,"topics":["gem","log","logger","ruby"],"latest_commit_sha":null,"homepage":"http://sixarm.com","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"quoideneuf/moma-ead-importer","license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SixArm.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null}},"created_at":"2011-11-28T07:54:46.000Z","updated_at":"2023-05-22T14:12:32.000Z","dependencies_parsed_at":"2023-07-05T18:31:22.007Z","dependency_job_id":null,"html_url":"https://github.com/SixArm/sixarm_ruby_pro_logger","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SixArm%2Fsixarm_ruby_pro_logger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SixArm%2Fsixarm_ruby_pro_logger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SixArm%2Fsixarm_ruby_pro_logger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SixArm%2Fsixarm_ruby_pro_logger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SixArm","download_url":"https://codeload.github.com/SixArm/sixarm_ruby_pro_logger/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246379366,"owners_count":20767696,"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","log","logger","ruby"],"created_at":"2024-12-12T11:08:50.369Z","updated_at":"2025-03-30T21:15:43.233Z","avatar_url":"https://github.com/SixArm.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SixArm.com → Ruby → \u003cbr\u003e ProLogger custom logger with better information\n\n\u003c!--header-open--\u003e\n\n[![Gem Version](https://badge.fury.io/rb/sixarm_ruby_pro_logger.svg)](http://badge.fury.io/rb/sixarm_ruby_pro_logger)\n[![Build Status](https://travis-ci.org/SixArm/sixarm_ruby_pro_logger.png)](https://travis-ci.org/SixArm/sixarm_ruby_pro_logger)\n[![Code Climate](https://api.codeclimate.com/v1/badges/3f2942d5f57dafdf80b4/maintainability)](https://codeclimate.com/github/SixArm/sixarm_ruby_pro_logger/maintainability)\n\n* Git: \u003chttps://github.com/SixArm/sixarm_ruby_pro_logger\u003e\n* Doc: \u003chttp://sixarm.com/sixarm_ruby_pro_logger/doc\u003e\n* Gem: \u003chttps://rubygems.org/gems/sixarm_ruby_pro_logger\u003e\n* Contact: Joel Parker Henderson, \u003cjoel@sixarm.com\u003e\n* Project: [changes](CHANGES.md), [license](LICENSE.md), [contributing](CONTRIBUTING.md).\n\n\u003c!--header-shut--\u003e\n\n\n## Introduction\n\nProLogger is a custom logger formatter for that prints these fields:\n\n  * Time stamp: such as ISO 8601 format using YYYY-MM-DD and HH:MM:SS.\n  * Program name: such as `$PROGRAM_NAME`\n  * Hostname: such as `Socket.gethostname`.\n  * Process Id: such as `Process.pid`.\n  * Severity: such as debug, info, warn, error, and fatal.\n  * Message: a string, exception, array, or any object that has a `inspect` method\n\n\n\u003c!--install-open--\u003e\n\n## Install\n\n### Gem\n\nTo install this gem in your shell or terminal:\n\n    gem install sixarm_ruby_pro_logger\n\n### Gemfile\n\nTo add this gem to your Gemfile:\n\n    gem 'sixarm_ruby_pro_logger'\n\n### Require\n\nTo require the gem in your code:\n\n    require 'sixarm_ruby_pro_logger'\n\n\u003c!--install-shut--\u003e\n\n\n## Setup\n\nExample setup:\n\n    Rails.logger.formatter = ProLogger.new\n\nExample use:\n\n    logger.info(\"Hello\")\n    =\u003e \"2011-12-31T12:59:59Z my_program my.example.com 1000 Hello\"\n\n\n## Options\n\nIntialize options:\n\n  * time_format: A format string for the `time.strftime` method.\n      Defaults to `\"%Y-%m-%dT%H:%M:%SZ\"` which is ISO 8601 format.\n \n  * progname: The running program name.\n      Default is `$PROGRAM_NAME`.\n  \n  * hostname: The server host name.\n      Default is `Socket.gethostname`.\n  \n  * pid: The process id number.\n      Default is `Process.pid`.\n  \n  * message_separator: Text to use to join mutiple messages.\n      Default is \" ... \".\n  \n  * backtrace_separator: Print this between exception backtrace lines.\n      Default is \" ... \".\n  \n  * line_separator: Change any message newlines to this text.\n      Default is \" ... \".    \n\nExample:\n\n    Rails.logger.formatter = ProLogger.new(\n      strftime: \"%Y-%m-%dT%H:%M:%SZ\", \n      progname: \"my_program\"\n      hostname: \"my.example.com\", \n      pid: 1000,\n      line_separator: \" / \"\n      backtrace_separator \" \\\"\n      message_separator: \" | \" \n    )\n\nThe message can be:\n\n  * a string: print the string, with leading whitespace stripped, and newlines replaced by line_separator.\n\n  * an exception: print the class, message, and backtrace items separated by backtrace_separator.\n\n  * an array of messages: print the items in the array, separated by message_separator.\n \n  * any object: first convert it to a string using object.inspect, then print it as a string as above.\n \n\n## Thanks\n\nThanks to topfunky for the open source custom logger at:\nhttps://github.com/topfunky/hodel_3000_compliant_logger/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsixarm%2Fsixarm_ruby_pro_logger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsixarm%2Fsixarm_ruby_pro_logger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsixarm%2Fsixarm_ruby_pro_logger/lists"}