What is the best (proper) way to share a logger instance amongst many ruby classes?
Right now I just created the logger as a global $logger = Logger.new variable, but I have a feeling that there is a better way to do this without using a global var.
If I have the following:
module Foo
class A
class B
class C
...
class Z
end
what is the best way to share a logger instances among all the classes? Do I declare/create the logger in the Foo module somehow or is just using the global $logger fine?