Kayvee translates an dictionary into a human and machine parseable string, with a "json" format.
The Kayvee formatter can be used directly or through the kayvee.logger
import kayvee as kv
print(kv.format(source="logger-test",
level=kv.INFO,
title="informational-log-title",
dict(id=name_id, context=context_str))import kayvee.logger as logger
log = logger.Logger("logger-test")
log.info("information-log-title", dict(id=name_id, context=context_str))
# Pass global variables:
log = logger.Logger("logger-test", default_fields=dict("query"=query))
log.info("msg-title")Other functions supported for structured logging:
Logger.debugLogger.infoLogger.warnLogger.errorLogger.critical
Supported metrics:
Logger.counterLogger.gauge
When you merge changes for a new version:
- bump the
VERSION - update
CHANGELOG.mdexplaining the changes - after merging, run
publish.sh- requires you to install twine and wheel via
pip install <package> - creates a git tag associating the version with the commit
- publishes the versioned package to pypi (Python package store)
- requires you to install twine and wheel via
If you have any issues, please work with #oncall-infra.