--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 …
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 …
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 …
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 …
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 . …
Understanding the Rails Logger | Grinding Gears
Introducing the YouTube Insult Generator
Why Bundler 1.1 will be much faster - Pat Shaughnessy
iOS 5: Tips, Tricks & Hidden Features
Daring Fireball: The iPhone 4S
Why programs become territorial - (37signals)
Until you're ready to delay things you really want done, it's fruitless to bemoan that parts of the code base territorial.
Steve Jobs and drug …
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 …
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.]
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!
A JavaScript image gallery for …
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 …
…In this code example, inside class Logger we create instance of the very same class Logger and we can access that instance with class method Logger.instance whenever we need to write something to the log file using the instance method "log". In the initialize method we just opened a log file for appending, and at the end of Logger class, we made method "new" private so that we cannot create new instances of class Logger. And, that is Singleton Pattern: only one instance, …