The Overlock python library allows logging and instrumentation of program code as a drop in replacement for python logging, but with some extensions. Only for use with the Overlock Agent for linux.
See https://docs.overlock.io/libraries/python/ for instructions.
Python versions supported:
2.7
3.4
3.5
3.6
pypy
pypy3
Using the library
The overlock library needs to be ‘installed’ in your code to configure and provide some details to the Overlock Agent:
from overlock import install
install(
# The name of the application program, defaults to "unknown"
process_name="sensor-reader",
# Any custom metadata for the app can be added here
metadata={
"version": "2.0.1",
"hardware_revision": get_hardware_version()
},
)
When installed, it can be used to log information from all parts of your system
from overlock import OverlockLogger
ol = OverlockLogger() # 1 - Import the logger
def read_sensor():
try:
value = read_sensor()
ol.set_state({"sensor_value": value}) # 2 - Use set_state to add state to the store
ol.info("got a new reading for the sensor") # 3a - Add a log message
return value
except SensorReadException as e:
ol.set_state({"sensor_value": "unknown"})
ol.exception("Error trying to get sensor value!") # 3b - Log an exception
Running tests
Install tox: pip install tox
Run tests tox
Note: you may want to comment out some of the python versions if your system does not have them installed.
Metadata
Release files for overlock 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| overlock-0.3.0.tar.gz | 7.0 kB | Without provenance | Details for overlock-0.3.0.tar.gz |
Release files / overlock-0.3.0.tar.gz
| Download URL | overlock-0.3.0.tar.gz |
|---|---|
| Size | 7.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a284f97f76f92e399bc7fef9bc6bdffe760093ae111a89fca68302246c9396f8
|
|
BLAKE2b-256 checksum How to use checksums |
a73bbeeb15b15ab712d7e3c1f8644ce2c39b4184088e93ed10c6041224edd723
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for overlock 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.