# Custom formatting of Rails log using log4r

**URL:** <https://community.graylog.org/t/custom-formatting-of-rails-log-using-log4r/463>\
**Category:** Graylog Add-ons\
**Created:** [March 14, 2017, 4:48pm UTC](https://community.graylog.org/t/custom-formatting-of-rails-log-using-log4r/463 "2017-03-14T16:48:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tessie](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/tessie/32/224_2.png) [@tessie](https://community.graylog.org/u/tessie)\
**Post date:** [March 14, 2017, 4:48pm UTC](https://community.graylog.org/t/custom-formatting-of-rails-log-using-log4r/463/1 "2017-03-14T16:48:06Z")

</div>

I am using log4r ruby gem to sent logs to graylog.How can I format logs such that  
I want to format the log such that I want to get the actionname and controller name with that so that search in graylog would be easy.
