Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple APILearn More
IntrusionCM13002102dPython has a full logging implementation in the stdlib...
Constructor injection is wrong on so many levels in python for logging.
PythonTryHard1184102d@IntrusionCM I get that from time to time when I mention "I use a custom logger". I don't mind using stdlib's logging, but it tends to get pushed down the list because it looks intimidating to get pretty logging going. `loguru` for me these days.
I will get around to learning `logging` some day.
IntrusionCM13002102d@PythonTryHard what I meant (sorry for being bit unclear) is that dependency injection for configuring logging is an anti pattern imho in python.
Dependency injection is an object oriented pattern which makes imho less sense in python - even less to inject not an object, but rather a variable for configuring...
I would expect a global variable or a global configuration possibility.
Afaik loguru is just the logging implementation on steroids (not saying it's what I would use nor that it's bad) - you still can e.g. set in your library a global logger variable, get that and use it to reconfigure the logger.
Sorry, brain fried, hope it makes sense.
fullstackclown6543102dWelcome to open source, where the commands are made up and the documentation doesn't matter!
horus1660101dWhy not tesseract? Is it so shitty?