2011/2/1 Albert Català <li...@ruby-forum.com>:
> Hello,
> I whish configure logger, adding a prefix in all "logger.error(..)", a
> prefix like "ERROR------------------>", to be able, then to search in
> log file, easily.
>
> And to do that I had the idea of reopen Logger class, like this:
>
>  - In a file placed in \initializers\ I put
>
>     def initialize(args=nil)
>       super(args)
>     end
>    def error(msg)

#also - this may give you an error
#  i remember this as
msg = %%ERROR#{'-'*5}>#{msg}%
super

>       super("ERROR------------>"+msg)
>     end
>   end
>
>  But this doesn't do anything, ¿ where do I have to put this code ?
>
>  - And if I put in config/environments/development.rb
>
>     config.logger = Logger.new(STDOUT)
>
> raises an error: [super: no superclass method `error' for
> #<Logger:0x3d7bae8>]
>
> Could someone guide me for the right way? I'm absolutly lost.
>
> What does usually people do to look for in the "great" production.log
> file?
>
> I know, if I put config.log_level = :warn, this file would be thin, but
> I supose than this "info" messages are important to understand the whole
> error.
>
> Thanks a lot.
>
> --
> Posted via http://www.ruby-forum.com/.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Ruby on Rails: Talk" group.
> To post to this group, send email to rubyonrails-talk@googlegroups.com.
> To unsubscribe from this group, send email to 
> rubyonrails-talk+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>



-- 
make haste slowly \
festina lente  \
-
mobile  +1_415_632_6001
cur...@robotarmyma.de
http://robotarmyma.de

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to