[Masterview-users] Logging from within a directive

Jeff Barczewski
Thu, 08 Jun 2006 20:28:30 -0000

The Logger is set on the MasterView module so you would probably need to
refer to it like

MasterView::Log.debug "foo"

or even better use

MasterView::Log.debug { "foo" }

The second form is better since it is a block and the block won''t get
executed if the output level is above debug which saves cpu if you were
doing any string building concatenating, etc.

On 6/8/06, Ed Howland <ed.howland at gmail.com>
wrote:
>
> Hi,
>
> I assume that the default logging level is Logger::DEBUG since by
> setting that in init.rb, I get lots of log messages in the WEBrick
> console window, like when the log level is not set. But if I put
>
> Log.debug "content_str #{content_str}"
>
> in my etag method of my directive, I don''t see any output in that
same
> window (or in log/development.log)
>
> Any ideas?
>
> TIA,
> Ed
>
>
>
> --
> Ed Howland
> http://greenprogrammer.blogspot.com
> _______________________________________________
> Masterview-users mailing list
> Masterview-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/masterview-users
>
-------------- next part --------------
An HTML attachment was scrubbed...