# Logger question

**URL:** <https://www.ruby-forum.com/t/logger-question/168078>\
**Category:** Ruby\
**Created:** [May 15, 2009, 4:10pm UTC](https://www.ruby-forum.com/t/logger-question/168078 "2009-05-15T16:10:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lycanthrope](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/a88e57/32.png) [@lycanthrope](https://www.ruby-forum.com/u/lycanthrope)\
**Post date:** [May 15, 2009, 4:10pm UTC](https://www.ruby-forum.com/t/logger-question/168078/1 "2009-05-15T16:10:48Z")

</div>

Without modifying the file logger.rb, is there a way to add a log  
severity level? For instance, I have a group of counters that I want to  
output at the end of a script run with a log level of REPORT ala

R, [2009-05-15T10:00:59.988975 #1422] RPT – : counter output message

---

<div class="post-metadata">

**Author:** ![lycanthrope](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/a88e57/32.png) [@lycanthrope](https://www.ruby-forum.com/u/lycanthrope)\
**Post date:** [May 15, 2009, 4:23pm UTC](https://www.ruby-forum.com/t/logger-question/168078/2 "2009-05-15T16:23:44Z")

</div>

On Fri, 15 May 2009 23:10:06 +0900, Reid T. wrote:

> Without modifying the file logger.rb, is there a way to add a log  
> severity level? For instance, I have a group of counters that I want to  
> output at the end of a script run with a log level of REPORT ala
> 
> R, [2009-05-15T10:00:59.988975 #1422] RPT – : counter output message

I am pretty sure you’d have to at least subclass Logger to achieve that.  
😕

Try out the logging gem perhaps?
