# Ruby printing to Cgi Error Log

**URL:** <https://www.ruby-forum.com/t/ruby-printing-to-cgi-error-log/145862>\
**Category:** Ruby\
**Created:** [August 14, 2008, 4:50pm UTC](https://www.ruby-forum.com/t/ruby-printing-to-cgi-error-log/145862 "2008-08-14T16:50:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lynchnco](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/c77e96/32.png) [@lynchnco](https://www.ruby-forum.com/u/lynchnco)\
**Post date:** [August 14, 2008, 4:50pm UTC](https://www.ruby-forum.com/t/ruby-printing-to-cgi-error-log/145862/1 "2008-08-14T16:50:58Z")

</div>

Hi guys,  
Just a simple question that I can’t seem to find anywhere on google.

is there a ruby equivalent for PHP’s error\_log()?

I’m writing a webpage, and it makes it a lot easier to debug if I could  
just write to the error log.

Thanks for your help.  
-Patrick

---

<div class="post-metadata">

**Author:** ![lynchnco](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/c77e96/32.png) [@lynchnco](https://www.ruby-forum.com/u/lynchnco)\
**Post date:** [August 14, 2008, 4:59pm UTC](https://www.ruby-forum.com/t/ruby-printing-to-cgi-error-log/145862/2 "2008-08-14T16:59:25Z")

</div>

Hi Patrick;  
There are a few frameworks in Ruby for handling logging.  
The one that comes with Ruby is documented here:  
[www.ruby-doc.org/core/classes/Logger.html](http://www.ruby-doc.org/core/classes/Logger.html)

There are also other frameworks available, such as Log4r:  
[log4r.sourceforge.net/](http://log4r.sourceforge.net/)

There are probably others available as well but these are the two with  
which  
I am currently familiar. Either of those should provide the  
functionality  
you are looking for.

–Tommy M.
