- `5` Remove colorama dependency
- `6` Remove log module. Logging defaults.
The library user can still use formatters and set log levels, for an example, see the vcspull
logging setup.
An example:
import logging
your app
log.setLevel(level)
log.addHandler(logging.StreamHandler())
vcslib logging options
vcslogger = logging.getLogger('libvcs')
vcslogger.propagate = False don't pass libvcs settings up scope
vcslogger.addHandler(logging.StreamHandler())
vcslogger.setLevel(level)
You can also use `logging.Formatter` variables `repo_name` and `bin_name` with repos:
repo_channel = logging.StreamHandler()
repo_formatter = logging.Formatter(
'[%(repo_name)s] (%(bin_name)s) %(levelname)1.1s: %(message)s'
)
repo_channel.setFormatter(repo_formatter)
vcslogger = logging.getLogger('libvcs')
vcslogger.propagate = False don't pass libvcs settings up scope
vcslogger.addHandler(repo_channel)
vcslogger.setLevel(level)