Custom formatting of Rails log using log4r

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.