mirror of https://github.com/hwchase17/langchain
consistently use getLogger(__name__), no root logger (#2989)
re https://github.com/hwchase17/langchain/issues/439#issuecomment-1510442791 I think it's not polite for a library to use the root logger both of these forms are also used: ``` logger = logging.getLogger(__name__) logger = logging.getLogger(__file__) ``` I am not sure if there is any reason behind one vs the other? (...I am guessing maybe just contributed by different people) it seems to me it'd be better to consistently use `logging.getLogger(__name__)` this makes it easier for consumers of the library to set up log handlers, e.g. for everything with `langchain.` prefixpull/2965/head^2
parent
32db2a2c2f
commit
69698be3e6
Loading…
Reference in New Issue