sixarm_ruby_pro_logger
SixArm.com » Ruby » ProLogger custom logger with better information
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (8.6%) to scientific vocabulary
Keywords
Repository
SixArm.com » Ruby » ProLogger custom logger with better information
Basic Info
- Host: GitHub
- Owner: SixArm
- License: other
- Language: Ruby
- Default Branch: main
- Homepage: http://sixarm.com
- Size: 449 KB
Statistics
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
- Releases: 0
Topics
Metadata Files
README.md
SixArm.com → Ruby →
ProLogger custom logger with better information
- Git: https://github.com/SixArm/sixarm_ruby_pro_logger
- Doc: http://sixarm.com/sixarm_ruby_pro_logger/doc
- Gem: https://rubygems.org/gems/sixarm_ruby_pro_logger
- Contact: Joel Parker Henderson, joel@sixarm.com
- Project: changes, license, contributing.
Introduction
ProLogger is a custom logger formatter for that prints these fields:
- Time stamp: such as ISO 8601 format using YYYY-MM-DD and HH:MM:SS.
- Program name: such as
$PROGRAM_NAME - Hostname: such as
Socket.gethostname. - Process Id: such as
Process.pid. - Severity: such as debug, info, warn, error, and fatal.
- Message: a string, exception, array, or any object that has a
inspectmethod
Install
Gem
To install this gem in your shell or terminal:
gem install sixarm_ruby_pro_logger
Gemfile
To add this gem to your Gemfile:
gem 'sixarm_ruby_pro_logger'
Require
To require the gem in your code:
require 'sixarm_ruby_pro_logger'
Setup
Example setup:
Rails.logger.formatter = ProLogger.new
Example use:
logger.info("Hello")
=> "2011-12-31T12:59:59Z my_program my.example.com 1000 Hello"
Options
Intialize options:
time_format: A format string for the
time.strftimemethod. Defaults to"%Y-%m-%dT%H:%M:%SZ"which is ISO 8601 format.progname: The running program name. Default is
$PROGRAM_NAME.hostname: The server host name. Default is
Socket.gethostname.pid: The process id number. Default is
Process.pid.message_separator: Text to use to join mutiple messages. Default is " ... ".
backtrace_separator: Print this between exception backtrace lines. Default is " ... ".
line_separator: Change any message newlines to this text. Default is " ... ".
Example:
Rails.logger.formatter = ProLogger.new(
strftime: "%Y-%m-%dT%H:%M:%SZ",
progname: "my_program"
hostname: "my.example.com",
pid: 1000,
line_separator: " / "
backtrace_separator " \"
message_separator: " | "
)
The message can be:
a string: print the string, with leading whitespace stripped, and newlines replaced by line_separator.
an exception: print the class, message, and backtrace items separated by backtrace_separator.
an array of messages: print the items in the array, separated by message_separator.
any object: first convert it to a string using object.inspect, then print it as a string as above.
Thanks
Thanks to topfunky for the open source custom logger at: https://github.com/topfunky/hodel3000compliant_logger/
Owner
- Name: SixArm
- Login: SixArm
- Kind: organization
- Email: sixarm@sixarm.com
- Location: San Francisco
- Website: http://sixarm.com
- Twitter: sixarm
- Repositories: 580
- Profile: https://github.com/SixArm
SixArm Software
Citation (CITATION.cff)
cff-version: 1.2.0
title: SixArm.com → Ruby → <br> ProLogger custom logger with better information
message: >-
If you use this work and you want to cite it,
then you can use the metadata from this file.
type: software
authors:
- given-names: Joel Parker
family-names: Henderson
email: joel@joelparkerhenderson.com
affiliation: joelparkerhenderson.com
orcid: 'https://orcid.org/0009-0000-4681-282X'
identifiers:
- type: url
value: 'https://github.com/SixArm/sixarm_ruby_pro_logger/'
description: SixArm.com → Ruby → <br> ProLogger custom logger with better information
repository-code: 'https://github.com/SixArm/sixarm_ruby_pro_logger/'
abstract: >-
SixArm.com → Ruby → <br> ProLogger custom logger with better information
license: See license file
GitHub Events
Total
- Push event: 1
Last Year
- Push event: 1
Committers
Last synced: 11 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Joel Parker Henderson | j****l@j****m | 93 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 9 months ago
All Time
- Total issues: 0
- Total pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Total issue authors: 0
- Total pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- flay >= 2.12.0, < 3 development
- flog >= 4.6.2, < 5 development
- minitest >= 5.11.3, < 6 development
- rake >= 12.3.1, < 13 development
- reek >= 4.8.1, < 5 development
- rubocop >= 0.57.2, < 1 development
- rubycritic >= 3.4.0, < 4 development
- simplecov >= 0.16.1, < 2 development
- sixarm_ruby_minitest_extensions >= 1.0.8, < 2 development
- actions/checkout v3 composite
- ruby/setup-ruby v1 composite
- addressable 2.8.4
- ast 2.4.2
- axiom-types 0.1.1
- bundler 2.3.26
- codeclimate-engine-rb 0.4.2
- coercible 1.0.0
- descendants_tracker 0.0.4
- docile 1.4.0
- equalizer 0.0.11
- erubi 1.12.0
- flay 2.13.0
- flog 4.6.6
- ice_nine 0.11.2
- jaro_winkler 1.5.5
- launchy 2.4.3
- minitest 5.18.0
- parallel 1.23.0
- parser 2.5.3.0
- path_expander 1.1.1
- public_suffix 5.0.1
- rainbow 3.1.1
- rake 12.3.3
- reek 4.8.2
- rubocop 0.68.1
- ruby-progressbar 1.13.0
- ruby_parser 3.20.1
- rubycritic 3.5.2
- sexp_processor 4.17.0
- simplecov 0.22.0
- simplecov-html 0.12.3
- simplecov_json_formatter 0.1.4
- sixarm_ruby_minitest_extensions 1.1.1
- sixarm_ruby_pro_logger 3.0.0
- thread_safe 0.3.6
- tty-which 0.3.0
- unicode-display_width 1.5.0
- virtus 1.0.5
