Keeping track of your application’s health has many different facets and different layers of information. Logging is the most basic tool, but can often be the most difficult to understand. While we strive to convey information by dashboard and graphical outputs as much as possible, sometimes there is nothing better than an old fashioned trip through the logs to get a good grip on the situation.
On the development side, we can use the Logger class in Ruby applications. It is part of the Ruby standard library and therefore easily accessible. The purpose behind Logger is to send log messages to some stream for review or to write logs directly to a file for retrieval at a later time. The following code shows an example of setting up Logger for use:
Messages from Logger can also be assigned flags to determine how severe an issue is. These messages can then be limited so that only messages above or below a certain threshold will be sent. This code shows an example of a message in the logs that has been marked as a “warning” level event:
Note: Here's another great post from the community, specifically from Cal Evans! Many moons ago, at the tender age of 14, Cal touched his first computer. (We're using the term “computer” loosely here, it was a TRS-80 Model 1) Since then his life has never been the same. He graduated from TRS-80s to Commodores and eventually to IBM PC’s. For the past 13 years Cal has worked with PHP and MySQL on Linux, OSX, and Windows. He has built a variety of projects ranging in size from simple web pages to multi-million dollar web applications. When not banging his head on his monitor, attempting a blood sacrifice to get a particular piece of code working, he enjoys writing books and sharing what he has discovered. His most recent being Signaling PHP.
When PHP 5 arrived there was great excitement and rejoicing over the new object model. For many of us who struggled through PHP 4's "Object Based" paradigm, PHP 5 was a ray of sunshine. We were so excited that many of us lost sight of another important addition to PHP 5, the Standard PHP Library (SPL).
Since then, the excitement over the object model has died down. Many authors and speakers have talked about, blogged about, and written about the SPL. However the SPL itself is a very large topic. We are going to narrow our focus down a bit to a subtopic of a specific section of the SPL. This blog post will deal with the
OuterIterator. This is an interface defined in the SPL and used by several of the built in iterators.
What is an Outer Iterator?
Happy New Year, blog-readers! Engine Yard and Microsoft Open Technologies will be kicking off 2014 with a one-day, pre-compiler workshop Hands-on Rails in the Cloud using the Engine Yard Platform as a Service (PaaS) on Windows Azure. The workshop will take place on January 7 at CodeMash, a unique conference educating developers on current practices, methodologies and technology trends in Sandusky, Ohio.
Join us to learn about the value and ease of hosting in the cloud and integrating with services such as storage and data. We will also discuss the differences between self-hosted, Infrastructure as a Service (IaaS) and Platform as a Service (PaaS) and share best practices for platform and application architecture.
The agenda for the day includes:
Happy almost New Year everyone! As we move into the New Year, we're excited to bring you another free Rails Girls workshop right here in sunny San Francisco at Engine Yard HQ! The event will take place on Friday, January 17 (for installfest) and on Saturday, January 18 (for the full workshop day). We'll be providing food, coaches and a great time for all.
Rails Girls is a wonderful non-profit workshop framework that teaches web application development to women all over the world. Recent workshops have been held in China, Ukraine and Japan, among many other places. It's an incredibly rewarding experience for both coaches and students alike; coaches and organizers get to share their passion for technology with those excited to learn new techniques. Everyone wins!
We're looking forward to hosting another Rails Girls and encourage you to sign up to be a coach or a student. We're looking for both at the moment!
So what are you waiting for? Sign up now and we'll see you soon!
(And if you'd like to help sponsor, feel free to contact me.)
Community is the cornerstone of everything we do and 2013 was a stellar year for tech communities. We’d like to end the year by taking a moment to look at some of the highlights.
There have been a bunch of new user groups popping up all over the world, including Dayton.rb, SweetlakePHP, ViennaPHP, Erie.rb, and Saglac.io (meetup group in Alma, Quebec). These groups have brought a focus on technology to their area.The leaders of these groups have been moving and shaking to make it happen in their towns. Good going, folks!
We’ve seen community efforts become simultaneously more local and more global at every level: from meetups to day camps, barcamps to full blown conferences. Some great new conferences this year included Nickel City Ruby, Madison PHP, Midwest PHP, Wicked Good Ruby, Ancient City Ruby, RobotsConf, PHPNE, and of course our own Distill, which will be returning in 2014!