Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有几个使用日志库的库。我想访问这些库中定义的所有记录器并设置我想要的日志记录级别,而无需触及这些库的代码。我需要动态地这样做,因为我事先不知道这些库将定义的记录器
你会怎么做?
定义的记录器类存储在logging.Logger.manager.loggerDict.
logging.Logger.manager.loggerDict