Developing a custom error logger in Ruby