logger-gem
VidaZing logging strategy using TwP/logging.
Writes to rolling log files and the corresponding IO pipe.
- timestamps for:
logs/error.log
+ stderr. - timestamps for:
logs/build.log
+ stdout.
Installation
In your
Gemfile
, add thevidazing_logger
gem:gem 'vidazing_logger', '~> 0.2'
In your
shell
, run:bundle install
(Optional - If you want to use the
rake loop:
tasks) Install fswatch(Optional - If you use
pry
) Ran into a byebug issue that you can fix with:gem install byebug gem install pry-byebug
Usage
See rake -T
Gem
require 'vidazing_logger'
# Easy
optional_name = "DearDiary"
optional_log_dir = 'logs'
logger = VidazingLogger.logger(optional_name, optional_log_dir)
# Customized. See VidazingLogger::Logger#build
LoggerBuilder.build(name: @name) do |builder|
builder
.add_stdout
.add_build_log(log_dir: @log_dir)
.add_stderr
.add_error_log(log_dir: @log_dir)
end
Binary
vidazing_logger
for all your stand alone shell logging needs. We should probably let you disable the logs/
file logging... Moving along!
Install with gem install vidazing_logger
See vidazing_logger --help