langchain icon indicating copy to clipboard operation
langchain copied to clipboard

Make logger instance local to each instance that uses it

Open nfcampos opened this issue 3 years ago • 1 comments

Any class with verbose property should now implement an (optional) logger prop (which if not specified defaults to global logger as before).

BaseLogger now inherits from pydantic.BaseModel so that it can easily be used as the type of a property on the other classes which inherit from BaseModel.

nfcampos avatar Dec 27 '22 14:12 nfcampos

@hwchase17 This is a first step towards being able to eg. run multiple independent agents in the same python process logging to different places.

nfcampos avatar Dec 27 '22 14:12 nfcampos

Closing this

nfcampos avatar Jan 03 '23 22:01 nfcampos