-
Notifications
You must be signed in to change notification settings - Fork 781
Can't chain .opt() calls #192
Copy link
Copy link
Closed
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationenhancementImprovement to an already existing featureImprovement to an already existing featurewontfixThis will not be worked onThis will not be worked on
Description
Calling opt more than once on a logger instance overrides all options that aren't specified to default, meaning you can't chain .opt() calls together.
For example in the following call, the color codes are ignored.
logger.opt(ansi=True).opt(depth=1).debug('<red>aoeu</>')This doesn't make a lot of sense when done directly like this, but if you are using the recipe for adding custom loglevel methods, it calls .opt() to set the depth. The consequence of this is that you can no longer use .opt() directly from you code, since it will always be overridden by the depth call, including all of the options other than depth.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationenhancementImprovement to an already existing featureImprovement to an already existing featurewontfixThis will not be worked onThis will not be worked on