VidaZing logging strategy using TwP/logging.
Writes to rolling log files and the corresponding IO pipe.
- Installation
- Usage
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!0.2.1
defaults to logging to STDERR / STDOUT. See --help.
Install with gem install vidazing_logger
See vidazing_logger --help