Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
First, ansi markup in "*args" and "**kwargs" are ignored when used while "opt(ansi=True)". This caused errors, as such arguments can contains tags which are not intended to be used as color markups. Secondly, it strips the color markups present in the "record[message]" so it can be used somewhere else where the "ansi" context is lost (like when logs are emitted through socket). Actually, the colors are part of the handler so it makes sense to strip them from the record. These change required a whole refactoring of the coloration process. It has been implemented with optimization in mind: trying to parse the ansi message only once, then using the generated tokens to colorize the message appropriately in each handler. It could certainly be improved, though.
- Loading branch information