TwP / logging

A flexible logging library for use in Ruby programs based on the design of Java's log4j library.
https://rubygems.org/gems/logging
MIT License
530 stars 101 forks source link

How to initialize logging and use it everyway with default configs? #192

Closed omurbekjk closed 5 years ago

omurbekjk commented 6 years ago

How to configure logger with colors and outputs, and use it in another ruby classes. Example, logger should log messages to the console and development.log.

TwP commented 5 years ago

Take a look at the examples folder here in the repo. The examples/appenders.rb file demonstrates how to log to both stdout and a file. The examples/colorization.rb file demonstrates adding colorization to an appender via a layout.