Skip to content

jatindhankhar/reox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Reox (Re(d+b)ox)

Gem GitHub CodeFactor Coverage Status Build Status

Reox is a simple stream logger library.

Prerequisites

Ruby 💎

Installing

Just install the gem

gem install reox

Getting Started

Wrap the portion you want to record inside the record block

require 'reox'

Reox.record do
  puts "I will be logged :)"
end

puts "I won't be logged"

will store it in output.log as

This is a test
4556

If you want logs to be verbose

require 'reox'

Reox.record{verbose: true} do
  puts "I will be logged :)"
end

puts "I won't be logged"

will store it in output.log as

I, [2019-04-28T19:31:29.402618 #9435]  INFO -- tester.rb:5:in `puts': This is a test

I, [2019-04-28T19:31:30.910717 #9435]  INFO -- tester.rb:7:in `puts': 456

or Use it for whole code

require 'reox'

Reox.record! # or verbose mode Reox.record!({verbose: true})

puts "Everything will be logged"
puts "Unless we stop it, which is optinal " 

Reox.stop! # Optional to stop recording 

puts "Phew!, I escaped  the logger "

License

This project is licensed under the MIT License - see the LICENSE file for details

Acknowledgments

About

Reox is a simple stream logger library.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages