Since loglevel supports sub-loggers through the loglevel.getLogger() function, would it be acceptable to have a function for listing existing loggers? I see that the object containing the logger references is within the module's closure and not accessible from the outside (which is good imho).
However, I'm wondering if it would be nice to have a function that reads the keys of this object and returns them as a list perhaps? Or some other structure which makes sense. I think this could be really useful when debugging an application which dynamically creates loggers, or if you have many loggers.
As discussed in #94: this is implementable as a standalone plugin and (until there are common use cases where it would be particularly useful) that's where it should live for now.
Since
loglevel
supports sub-loggers through theloglevel.getLogger()
function, would it be acceptable to have a function for listing existing loggers? I see that the object containing the logger references is within the module's closure and not accessible from the outside (which is good imho).However, I'm wondering if it would be nice to have a function that reads the keys of this object and returns them as a list perhaps? Or some other structure which makes sense. I think this could be really useful when debugging an application which dynamically creates loggers, or if you have many loggers.