How to instantiate a logger in an Engine only once and then use only that object?

I found this thread:

One commentator says:

To minimize engines polluting our logs, we just changed the logger for
the engines plugin like this:

In engines.rb, update the logger method:

   def logger
     #RAILS_DEFAULT_LOGGER + "/log/engines.log")

And then create an "engines.log" under your /log directory. Now all
engines related logging will be directed to that file instead of your

My question is, how to use it then? Wouldn't it instantiate a new Logger
instance every time I call it?

def some_foo_method
  # I want to log something, I call the logger method
  logger.debug("I did something")

So, the "logger" method instantiates a new Logger instance every time.
It is not good to have dozens logger instances in memory. How to avoid
it? How to instantiate only once and then just use that one instance?