Open argrento opened 2 months ago
Keep in mind there is only one global registry of the handlers. The logger
is a facade toward these handlers. The bind()
method is helpful to give context to messages logged by a logger. However, in the end, it will always end up to the same set of handlers, because they share the same reference to it.
If you really want to create separate logger
that can manage handlers independently, refer to the documentation: Creating independent loggers with separate set of handlers.
Consider this code
When I print it, I see the following:
Why id of
logger
also changed?