24 April 2014

The Ruby Reflector

Topic

Lumberjack

  Source Favicon
By Jesse Storimer of Ruby Inside 10 months ago.
Email

…definitely possible for that @ logger to be initialized twice. Again, initializing a Logger twice may not be a problem in this case, but I have seen bugs like this in the wild that do cause issues.

Reflections

I want to leave you with some lessons at the end of all this.

4 out of 5 dentists agree that multi-threaded programming is hard to get right.

At the end of the day, all that the GIL guarantees is that MRI's native C implementations of Ruby methods will be executed …

rubyinside.com Read
  Source Favicon
By Dan DeLeo of Chef Blog 1 year ago.
Email

--force-logger : Logger all the time

Note that the logger is not completely disabled when formatters are enabled, because some kinds of messages, such as deprecation warnings, are not yet integrated with output formatters. What we've done instead is add a special log level, "auto", and made this the default. When an interactive terminal is detected, "auto" is equivalent to "warn," and when one is not detected, it's equivalent to "info." If you're …

opscode.com Read
  Source Favicon
On paperplanes over 1 year ago.
Email

Logger relies on strict ordering of the messages it processes. It relies on several minions to put the texts back together after they were processed. To make sure ordering is properly applied, one minion always processes chunks from a specific text.

Logger uses the text's title to figure out which minion is responsible. This has the advantage that Logger can call in more minions as more texts are coming in. As titles vary pretty wildly, Logger can just assume that work will be distributed …

paperplanes.de Read
  Source Favicon
By santiago.pastorino of WyeWorks Blog - The Team's Voice 2 years ago.
Email

Rails::Rack:: Logger

Rack:: Runtime : Adds a header to the response listing the total runtime of the request.

ActionDispatch:: ShowExceptions : Rescue exceptions and re-dispatch them to an exception handling application.

ActionDispatch:: DebugExceptions : Log exceptions.

ActionDispatch:: RemoteIp : Protect against IP spoofing attacks.

ActionDispatch:: Reloader : In development mode, support code reloading.

ActionDispatch:: ParamsParser : Parse XML, YAML

blog.wyeworks.com Read
  Source Favicon
By Eric Wong of Practicing Ruby 2 years ago.
Email

Thus, you must ensure any code you use inside a signal handler is reentrant-safe. Even using the Logger class in the Ruby standard library (which can call Mutex#synchronize) can deadlock inside a signal handler.

Signal reliability

Signals are not completely reliable in Ruby (nor many applications, for that matter). If multiple, identical signals are received in a short time frame, you're guaranteed to fire a handler for /at least/ one of the signals, but not all of the signals …

blog.rubybestpractices.com Read
  Source Favicon
By Mike Gunderloy of A Fresh Cup over 2 years ago.
Email

Logger has morphed into ActiveSupport:: Logger . The work was completed in 00236435221a39441af3f1e76110767fba4154a8 .

904e544cc8f5846de7c31827bb5556c6a238c0de adds a benchmark helper that works in ERB. This allows your views to contain things like <%= benchmark do %>Hello World<% end %> which then puts the benchmarking results in the log.

A couple of small changes in the sprockets compiler were merged in 7cfd1bd76a41bea528c945d821a9fbc3902af479 . …

afreshcup.com Read
  Source Favicon
By Trevor of Trevor Turk over 2 years ago.
Email
  Source Favicon
By Assaf of Labnotes over 2 years ago.
Email

Logger dumps the request URL when running with DEBUG=true

The pass-through proxy will pass the request directly to the server in bloody mode, or when talking to localhost

The recorder proxy will either replay a captured request (if it has one), talk to the server and capture the response (in record mode), or pass to the next proxy

The pass-through proxy (2nd one) will pass the request to the server in cheat mode, return nothing in all other modes

Loading pre-recorded responses to …

blog.labnotes.org Read
  Source Favicon
By Trevor of Trevor Turk over 3 years ago.
Email

Ruby Mongo DB Logger for Rails - centralized logging for rails apps in MongoDB. [Check the activity in the Github network, though. Central Logger is more actively maintained.]

tenderlove's texticle

Texticle exposes full text search capabilities from PostgreSQL, and allows you to declare full text indexes. Texticle will extend ActiveRecord with named_scope methods making searching easy and fun!

aino's galleria

A JavaScript image gallery for …

almosteffortless.com Read
  Source Favicon
On Litany Against Fear 4 years ago.
Email

This is your favorite Logger class, just now without an annoying constant name of RAILS DEFAULT LOGGER . Much easier to remember. $ rails console >> Rails.logger => #<ActiveSupport::BufferedLogger:0x21de384 ...

>> Rails.logger.info "zomg!" => "zomg!\n"

>> File.read("log/development.log") => "zomg!\n"

Rails.public path

A helpful shortcut to what your public assets directory is called, probably to use with …

litanyagainstfear.com Read